Two workers had to be rescued from a ledge near the top of a high-rise in midtown Toronto on Thursday afternoon after the window washing platform they were on collapsed.

Police say that both individuals were working near the 18th floor of the building on Yonge Street just south of Eglinton Avenue at around noon when their platform gave way and ended up plummeting hundreds of feet.

Both workers were wearing harnesses at the time and were briefly left dangling high above the ground below before firefighters helped them make their way to a ledge near the roof of the building.

They then broke the glass windows near that ledge and pulled both men to safety.

Parts of the dramatic rescue, which unfolded over the course of about an hour, were captured in a video obtained by CP24.

The video shows a firefighter dangling a long rope with a loop on the end and hooking it onto one of the window washer’s legs. They then use the rope to bring the window washer closer to the building, allowing them to pull themselves up using the rope attached to their harness.

CP24’s cameras also captured the concluding moments of the rescue after both men were safely on the ledge.

In that footage, one of the men is seen standing to the side while firefighters break the window. He is then handed a helmet and is seen carefully backing into the opening while still attached to his harness.

“They both made it to the same ledge and they were both basically saved by their safety equipment,” Toronto Fire District Chief Stephan Powell told CP24 as the rescue unfolded.

The window washing platform that the men were on ended up landing on the sidewalk below with some of it extending into a curb lane along Yonge Street.

Luckily, there were no reports of anyone passing through the busy area being struck by the falling debris.

The workers were also unharmed.

“We get a good number of these calls every year and we are very fortunate that almost all of them turn out with a positive result,” Powell told CP24. “Fortunately we were able to break the glass to get to them. In other circumstances our high angle rescue team sometimes has to go over the top of a building and come down next to the trapped window washers and transfer them to their safety lines before bringing them down to the ground.”

The Ministry of Labour will be attending the scene to conduct an investigation.

In a statement provided to CP24, a spokesperson for the ministry said that the employer involved in the incident is Solar Window Cleaning.

Yonge Street is closed to traffic south of Eglinton Avenue while police clean up the scene.