SAN FRANCISCO (AP) — Firefighters in San Francisco rescued 15 people and seven cats and dogs as flames ripped through an apartment building, officials said. Eight people suffered injuries in Saturday’s blaze and four of them were hospitalized.

The fire burned on the third and fourth floors of the building in the city’s South of Market neighborhood, the fire department said.

Fifteen apartments in the building were impacted, fire department spokesman Jonathan Baxter told SF Gate.

The injured people were expected to recover and the rescued pets were all right, officials said.

“Everyone and every pet will be okay,” the fire department said on Twitter.

The fire’s cause is under investigation.