Three workers left dangling from collapsed scaffolding outside a high-rise building undergoing construction in San Francisco on Thursday were safely rescued by fire crews, according to local news reports.

One woman and two men were on the scaffolding working outside of the building's 19th floor, said San Francisco Fire Department Spokeswoman Mindy Talmadge. When the scaffolding collapsed the workers were left hanging in their fall protection safety harnesses, Talmadge said.

One of the workers was able to reach a balcony of the building, the Golden Gateway Apartments located at 440 Davis St., Talmadge said.

The worker lifted another worker to safety on the balcony, and fire crews pulled the last worker to safety through a window on the 19th floor, Talmadge said.

The building stands about 21 stories high, and workers were likely conducting some kind of maintenance or cleaning.

All three workers were transported to a local hospital, Talmadge said. At least one of the workers reported minor injuries, she added.

The female worker was reportedly described by observers as very visibly shaken after the incident.

The reason for the collapse was not immediately known.