SAN FRANCISCO -- A defective steel support pole that gave way atop a Mission Bay condominium tower left two window washers dangling high above the ground Thursday, with only their safety harnesses keeping them from plunging to their deaths, authorities said.

Raul Aguilar and his nephew, Benito Aguilar, were pulled to safety after their scaffolding outside the top floor of the 16-story Arterra condominium complex at 300 Berry St. collapsed about 8:30 a.m.

The scaffolding was suspended from two davits, steel arms attached to the building's roof. One of the davits gave way and plummeted to the courtyard below, leaving the scaffolding in a vertical position, said Mindy Talmadge, a Fire Department spokeswoman.

The men are alive because they were wearing safety harnesses, which were attached both to the remaining davit and the scaffolding. One of the workers was pulled up to the roof and the other was pulled in through an open window on the 14th floor, Talmadge said.

Both were treated at San Francisco General Hospital for unspecified injuries that were described as moderate to serious. No one on the ground was hurt when the davit fell.

Rick Dickerson, head of the building's management company, said the steel arm had collapsed when a weld gave way.

Cal/OSHA is investigating the cause of the accident, and will look at both the company that employs the window washers and the building's management, agency spokeswoman Erika Monterroza said. Such investigations are usually completed within four months.

The men have worked as window washers for 15 to 20 years, the last five at Capital Building Maintenance Group LLC, said company owner Eric Huber.

He said the davits are part of the building and that it was the building management's responsibility to maintain them.

Dickerson, president of Maynard Rich Management, said the davits and other equipment had passed inspection within a month before window washing began on the building.

Under Huber's ownership, Capital Building Maintenance Group has been cited once by Cal/OSHA, for a 2009 violation involving the way the company attached a boatswain chair, a device that allows workers to pull themselves up while sitting, to a building's safety lines. The fine totaled $200.

Maynard Rich Management has not received any citations within the past seven years.

Huber and Dickerson both said they believed this to be a freak accident.

"It was a one-in-a-million-type situation when equipment like that would fail," Huber said. "These are big steel pieces. They should last for a long, long time."

Huber, who visited the two men at the hospital, said both were doing well.

"They're a bit shaken, but they wore their safety harnesses and ultimately that's what saved their lives," he said. "They have minor scrapes and bruises, but are in good spirits."