NEW YORK (WPIX) — An ice cream heist did not go as planned when an alleged Häagen Dazs thief had to be rescued by police Tuesday morning.

Police responded to a burglary in progress around 9:30 a.m. in East Harlem. Officers arrived at the location and saw a man matching the description of the suspect, police said.

The suspect ran into a nearby courtyard along East 98 Street and Lexington Avenue and climbed over a fence, according to authorities. However, the suspect did not realize the height of the fence and became stranded on the ledge, police said.

Authorities cut the fence, placed a harness on him and brought him down to safety. The man, later identified as 30-year-old Anthony Pastore, was subsequently arrested for stealing eight pints of Häagen-Dazs ice cream, police said.

He faces changes of petit larceny and criminal possession of stolen property.