An explosion in a Baltimore high-rise injured 23 people Wednesday and temporarily trapped a window-cleaning crew. 

The explosion caused a partial roof collapse, the Baltimore Fire Department tweeted. Twenty-one people were taken to the hospital and two others declined treatment. 

'NORCAL RAPIST' SENTENCED TO 897 YEARS IN PRISON FOR 9 RAPES

A worker stands on the end of a dangling scaffold as he waits to be rescued following an explosion at Baltimore Gas and Electric's offices, on Wednesday. Twenty-one of the victims were brought to area hospitals following the explosion with a partial roof collapse. The city’s fire department tweeted that at least nine of the victims were in critical condition, while another was in serious condition. (Jerry Jackson/The Baltimore Sun via AP)

A worker stands on the end of a dangling scaffold as he waits to be rescued following an explosion at Baltimore Gas and Electric's offices, on Wednesday. Twenty-one of the victims were brought to area hospitals following the explosion with a partial roof collapse. The city’s fire department tweeted that at least nine of the victims were in critical condition, while another was in serious condition. (Jerry Jackson/The Baltimore Sun via AP)

The department responded to the downtown building, where the Baltimore Gas and Electric Company has offices, around 8:30 a.m. and two buildings on both sides were evacuated. The firefighter's union tweeted that evidence pointed to an explosion on the 16th floor.

The fire department said the cause of the explosion remains under investigation. Utility spokeswoman Stephanie Anne Weaver said work on the building’s "air handling and boiler system" likely caused the accident.

The explosion was not natural-gas-related, the company Fox News in a statement. "The building’s gas service was not active due to the construction work."

The trapped window workers were rescued through a window and firefighters continued to search the building Wednesday afternoon. 

"Window washing scaffolding was compromised because of the incident and a window washing crew was pulled to safety by the fire department," Weaver said in a statement. The building was practically empty because of the holidays and the coronavirus pandemic.

Damaged scaffolding hangs off the side of the Baltimore Gas and Electric building on Wednesday in Baltimore. Twenty-one of the victims were brought to area hospitals following the explosion with a partial roof collapse. The city’s fire department tweeted that at least nine of the victims were in critical condition, while another was in serious condition. (Jerry Jackson/The Baltimore Sun via AP)

Damaged scaffolding hangs off the side of the Baltimore Gas and Electric building on Wednesday in Baltimore. Twenty-one of the victims were brought to area hospitals following the explosion with a partial roof collapse. The city’s fire department tweeted that at least nine of the victims were in critical condition, while another was in serious condition. (Jerry Jackson/The Baltimore Sun via AP)

CLICK HERE TO GET THE FOX NEWS APP

Keith Osterman, 38, and Robert Friedel, 58, were working in a neighboring building and were outside when they heard the explosion.

"It was loud and everything around here shook," Osterman told The Baltimore Sun.

The Associated Press contributed to this report.