A brazen intruder took selfies and read secret crime reports as he roamed Motherwell police station unchallenged for more than three hours.
William Linton took pictures of himself wearing a police hat and filmed himself getting comfortable behind the desk of a senior officer.
He also smashed the window of a patrol car, defaced notebooks and stole a set of handcuff keys.
At one point during the night a cleaner appeared and Linton carried on reading papers and asked her to shut the door behind her.
Senior officers launched an inquiry into the incident on October 8, 2014 and Linton handed himself in.
Linton (25), of Edinburgh, said he had gone to the station in a bid to get arrested in an attempt to get noticed after losing his job and his girlfriend.
Just after 3.30am he pressed a door buzzer and was given access to the building by a worker inside.
He wandered the corridors before entering an office on the first floor where he sat behind the desk and read paperwork and clowned around with a uniform.
At Hamilton Sheriff Court, Linton, of Edinburgh, admitted charges of malicious damage, breach of the peace and theft.
Fiscal depute Lisa Lann said: “Most of the CID rooms require a code to gain entry but one room didn’t.
“He read a number of crime reports which included names and addresses, details which normally wouldn’t be accessible to members of the public.
“He also tried to gain access to the police computer but was unable to.”
Linton’s antics ended only when a police civilian worker arrived around 7am and spotted him.
Mrs Lann added: “Linton was sitting at a desk with his feet up on an open drawer.”
Sheriff Ray Small deferred sentence until next month.