NEW YORK (CBSNewYork) – A scaffold collapse left three workers dangling off a building Friday on East 65th Street between 2nd and 3rd Avenues.

All three workers were rescued shortly after the collapse. They were brought in through a window to safety.

The three workmen were on a scaffold 17 stories up when it slipped at around 10:15 a.m., reported CBS 2’s John Slattery.

“I just was praying they weren’t going to fall,” bystander Matthew Marco said.

The scaffold itself is the type that is hung over the side of a building from the roof, as opposed to a structure built up from the ground.

A deputy buildings commissioner told CBS 2 an apparent brake problem in one of the cable motors set the scaffold dangling at a 45-degree angle.

“I looked up and they were on the scaffold and I couldn’t believe it,” said bystander Jenna Reynoso.

Fire department, police and emergency rescue personnel responded to the scene. By the time they arrived, one of the workers was trying to get into the building through a window.

Police emergency service officers went to the roof with rigging.

“When we got to the 20th floor, we really didn’t have any other options afforded to us,” explained Det. Shawn Soler of NYPD Emergency Services. “So we started to looking at different areas of how we can mitigate the situation. The first thing would be to actually find something to tie into, which we successfully did. The second thing would be actually to get to the aided. We have to make sure that not only we’re safe but they’re safe as well.”

“We tied directly into the building, a piece of building,” Soler added.

His partner rappelled down the side of the building to the delight of onlookers.

“There was a fireman climbing down to get to the scaffold. He looked like Spider-Man,” said bystander Neal Rosen.

Detective James Coll, who wasn’t a fireman, reached the terrified men on the precarious platform.

“One of them was complaining he had numbness in his hand, was holding on, concerned he might fall,” Coll said.

“We actually train to do this,” said another officer. “We have some of the best training and best equipment in order to do this. I was just thinking I hope we get down there in time and we’re able to help these guys out.”

Firefighters inside, removed windows to bring in the workers, on Friday the 13th.

“This all turned out very well, so if all Friday the 13ths could be like this, I’ll take it,” Soler said.

There may have been a language barrier, but the rescuers could be heard saying thank you to the men in uniform.

The workmen 35, 45 and 47 were doing brick and window repairs when the accident occurred, Slattery reported. They were taken to a hospital in stable condition.

What do you make of the rescue? Sound off in our comments section below.

Watch & Listen LIVE