An Italian court has ruled that getting dressed in the morning is part and parcel of an employee’s official duties after siding with a policeman who became a symbol of skiving officialdom when he was caught clocking on for work in his underpants.

Alberto Muraglia found himself a national laughing stock after his portly frame, in Y-fronts and t-shirt, was captured on CCTV punching a time card in the council accommodation block where he and his family lived.

After clocking on, he went upstairs to his apartment to get dressed for the day’s work in the seaside town of Sanremo, in the northern region of Liguria.

But in a decision which has sparked bewilderment and indignation, a court in the nearby town of Imperia has ruled it was legitimate for the officer to clock on at the start of his shift and then go home to pull on his uniform, saying that getting dressed in the morning is an integral part of a public servant’s duties.

The court acquitted him of the charge of defrauding the state of public funds.

“The fact that he was in his civilian clothes does not matter because putting on the uniform is considered part of work, so it can be done after clocking on,” said Alessandro Moroni, the officer’s lawyer.