An out-of-control lift basket lurched through the air at a high-rise building in Oklahoma City, endangering two window washers who were inside it.

The lift’s wild swings were first noticed before 8 a.m. local time Wednesday. At the time, the basket was above the roof of the 50-storey, 260-metre-tall office tower.

Video from the scene showed the basket making extreme movements through the air, being picked up and moved around by heavy gusts of wind.

Multiple windows were broken as the lift swung through the air, sending shards of glass falling to the ground below. Roads in the area were cordoned off to protect people from potential hazards.

Firefighters were able to get the window washers to safety by using ropes to secure their scaffold.

Fire battalion chief Benny Fulkerson described the rescue effort as “tedious” but successful.

“It appears as though it went as smoothly as it possibly could have in a situation like this,” he told reporters at the scene.

Fulkerson said he was not aware of any injuries at ground level. The two window washers refused offers of medical treatment at the scene.

The cause of the incident is under investigation.

With files from The Associated Press