SAN FRANCISCO (AP) — An explosion caused by a gas leak ripped through an apartment building in San Francisco Monday as firefighters arrived on scene to check on a gas leak, a fire official said.

No one was injured in the blast that blew out windows and blinds and a garage door but about 100 people had to evacuate nearby buildings, Battalion Chief Rex Hale said.

He said it appears gas filled up the garage and it hit a pilot light, causing the explosion inside a three-story apartment building in the Bernal Heights neighborhood.

No one was inside the building when the explosion occurred, Hale said.

Residents of 19 nearby apartments and homes were evacuated. Those from neighboring buildings were allowed to return Monday afternoon.

San Francisco Fire Department crews and Pacific Gas & Electric Co. employees were working to stop the gas leak.

PG&E spokeswoman Andrea Menniti said the source, location and cause of the gas leak were being investigated.