NEW YORK (CBSNewYork) — There was a heroic rescue on the Upper West Side on Tuesday afternoon, after a man and a woman got trapped on a window ledge when their scaffolding collapsed 10 stories up.

Everyone who was up there is now safe and back on solid ground, but when their rigging platform gave out earlier the two workers had nowhere else to go except the narrow ledge of a window, while they waited for members of the FDNY to help lift them inside, CBS2’s Ali Bauman reported.

READ MORE: 2 Shot Aboard Subway Train In Harlem; Suspect At Large

The scaffolding was dangling at a near-90 degree angle while two workers balanced on windowsills, clutching their harnesses.

“They were hanging on to the ledge of the window,” witness John Bedolis said.

“Holding the rope from the outside,” Audrey Bedolis added.

Firefighters were called to West 78th Street off Broadway, where they say scaffolding became partially upended around 4:30 p.m. while a man and a woman were doing facade work on a residential building.

“They opened or broke the windows. Then the firefighter helped one of the guys get in through the window. Then he climbed in after,” witness Michelle Kneseach said.

MOREFirefighters Turn Into Crimefighters, Take Down Man Who Allegedly Assaulted 60-Year-Old Woman On Bed-Stuy Street

But the second worker was still trapped on the ledge, so firefighters had to go on the roof, throw a rope down the side of the building, and lower one of their members over the edge.

“Attach their safety line to the other worker, pull him up a little, take him off his safety line, and then lower him down and get him into the window,” FDNY Deputy Chief John Shaw said.

READ MORE: Connecticut Reports First Confirmed Case Of Omicron Variant

That hero propelling down was Firefighter Andrew Dinkel.

“The gentleman on the ledge, he was hanging on to the ledge pretty tight. He was very nervous, obviously. The scaffolding he was on was no longer there so he’s not used to just hanging from the side of the building,” Dinkel said.

The firefighter was able to calm the worker and help him climb through the top of the window. Both workers were later seen walking to the back of an ambulance.

“It’s very scary and everyone applauded when they got them inside,” Audrey Bedolis said.

It was the FDNY’s second high-angle rescue in two weeks. On Sept. 1, firefighter in Harlem used a rope rescue to save a woman from the 16th floor of a burning building.

Back on the Upper West Side, Firefighter Dinkel humbly attributed the rescue to his training and his team.

“I wouldn’t call it a walk in the park, but, yes, we do it to the point where it becomes muscle memory,” said Dinkel, who has been with the FDNY for 17 years.

As for the two workers, authorities said there were treated for minor injuries at the hospital and are expected to be OK.

MORE NEWS: Harlem Resident Who Helped Police Catch Suspect In Deadly Stabbing Recalls 'Unbelievable' Encounter With Alleged Killer

You can get the latest news, sports and weather on our brand new CBS New York app. Download here.