A man set off a "barrage of fireworks" in Alloa police office on Hogmanay because he thought it would be amusing.
Robert Hood was remanded in custody for background reports
Robert Hood, from Rose Street in the town, pleaded guilty to culpable and reckless conduct and was remanded in custody until 31 January for reports.
The 42-year-old, who had been drinking all day, walked into the building two hours before midnight and lit the box of "300-Shot Screaming Missiles".
He was traced by police after he told a taxi driver what he had done.
Alloa Sheriff Court was told the fireworks he used caused scorching to the walls, ceiling and seating of the waiting area of the police station.
He then ran out of the door, waving at the CCTV camera as he left.
Sandy Mitchell, prosecuting, told the court that Hood was first seen in the street outside the police station at 2145 GMT.
Mr Mitchell said: "He was unpacking a large box of fireworks and was walking towards the police station.
"Thirty seconds later police in the station heard a noise in the foyer.
"There was a barrage of explosions.
"They escalated, and almost blew the secure door off, and within seconds the whole ground floor of the police station was full of smoke."
Hood then went to a taxi office and said he wanted a car because he had just set off fireworks in Alloa police station.
The taxi driver told police where he had dropped the culprit off, and armed with a search warrant, officers entered the accused's home in the early hours of New Years Day.
They found seven boxes of 300-Shot Screaming Missiles and four boxes of Sky Rockets in his home.
Hood was arrested and taken to the nearest undamaged police office - Stirling Police Station - 12 miles away.
Mr Mitchell said: "He said he had been drinking all day.
"He said he had gone home and found some fireworks left over from Guy Fawkes' Night, and had formed the opinion that it would be amusing to set them off in the police office and run out of the door."
Remanding Hood in custody, Sheriff David Mackie said: "I am refusing bail because of the nature of the offence and to protect police officers."