It was one of those peculiar incidents that police can encounter after the long nights of a summer weekend in the capital.

According to news bureau NTB, the man in his 20s had tried to visit a lady friend in the building on Huitfeldts Street downtown. Newspaper Aftenposten Aften reported that she rejected his overtures, however, and he tried to leave the building. Slightly intoxicated, however, he couldn't manage to open the building's security gate to get out.

He then decided to try to squirm under the, and in the meantime had taken off most of his clothes. His exfiltration attempt didn't work. Instead, the man wound up stuck under the gate, in the buff.

He was stuck in this position for nearly four hours, since there was no traffic through the gate in the wee small hours of the morning. A neighbour finally spotted him and called police.

They found him around 6:35am but no matter how they tried, they couldn't help other than to cover him up a bit. They then summoned rescue personnel from the Oslo fire department, who finally managed to free him after using a hydraulic lift to jack up the gate.

"He was in fairly good condition, but he was a bit cold," said a police spokesman.