Emergency services mounted a three-hour operation involving a helicopter and a fire truck Sunday to retrieve a man who got stuck on the roof of a factory in Sydney that he was allegedly trying to rob, police said.

New South Wales state police said they were called early Sunday to the joinery factory where the 53-year-old man was stuck on the roof, apparently unable to move because of the wet weather and steep angle.

Numerous rescue attempts were made, and emergency crews eventually used a fire truck with a tall ladder to retrieve the man while a helicopter illuminated the rooftop.

Police said they arrested the man and charged him with trespassing, possession of housebreaking implements and attempted breaking-and-entering.

He was carrying a helmet with a light, bolt cutters, a small ladder, backpack, tarpaulin, ropes and harnesses, they said.