A man whose body was found in a wall behind a ladies’ toilet died after climbing through a vent to get inside, Canadian police have said.

On Monday, a maintenance worker at the Core shopping centre in Calgary was called to reports of a defective flush in the ladies’ toilets.

Upon removing a panel in the wall behind the faulty toilet, he made the unnerving discovery that there was a human body inside the wall.

The deceased, an unidentified man in his twenties, had been inside the wall since Friday evening, CBC reports.

Detectives believe the man removed a vent on top of the “pony wall” – a hollow unit which conceals the toilet mechanisms – and climbed inside on Friday evening, before becoming stuck.

However, his motives for doing so remain a mystery. The two-metre high wall does not connect to the ceiling and has no access to the rest of the building.

Extracting the body took “several hours”, the Globe and Mail reports, during which shoppers in a nearby food court dined “metres away” from a procession of police officers, firefighters and officials from the medical examiner’s office.

Police found no evidence of foul play and believe the man acted alone. The death has been ruled accidental and non-criminal, meaning the identity of the deceased will not be released to the public.