CALGARY -- Police say a man whose body was found inside a wall in a women's washroom in a downtown Calgary mall died accidentally after he crawled into a vent behind a toilet and got stuck.

"The victim's motivation for crawling inside the wall is unknown at this time," police said Wednesday.

His body was found on Monday morning by a maintenance worker who was called to fix a toilet that wouldn't flush on the fourth floor of The Core Shopping Centre.

Investigators say the man in his 20s entered the women's washroom alone on Friday evening. It's believed he climbed on top of a pony wall behind the toilets and removed a vent cover on top of the wall.

The wall -- about two metres high and not attached to the ceiling -- is used to hide utilities.

"Based on evidence at the scene, officers believe the victim then climbed inside the pony wall through the vent opening where he became stuck and later died," police said in a release.

A police spokesperson said a cause and time of death are not being released. Police have confirmed the man's identity, but are not publicly releasing it because his death is non-criminal.

It took several hours on Monday to extract the body. People dined in the food court metres away from the washroom, which had a yellow caution ribbon strung across the entrance, and officers could be seen ducking in and out, along with officials from the medical examiner's office. Several firefighters were there to help remove the body.

A security guard directed women to another washroom a floor below, but the men's and family washrooms were still accessible.

In the early afternoon, a section of the food court closest to the washroom was cordoned off entirely. About 3 p.m., a body shrouded in a black blanket was wheeled out.

A spokesperson for the shopping centre did not immediately respond to a request for comment.