A dog rescued from the streets returned the favor Wednesday, alerting his owner to an early morning fire that was raging inside an Oakland apartment building.

Julio Cruz stood outside in the pre-dawn darkness, hugging his pit bull mix named Pekita.

“She saved my life,” Cruz told KTVU. “I rescued her a few months ago and now she has rescued me.”

Cruz was asleep in the apartment building located in the 1400 block of 39th Avenue when the fire brought out at around 3 a.m.

“I was sleeping,” he said. “She started jumping onto my bed and barking. She continued barking until I got up.”

Taking Pekita with him, Cruz went and woke up his roommate.

“We got out,” Cruz said. “There was already fire in the apartment…It was pretty scary. There was a lot of smoke.”

In all 17 people were displaced by the fire.

Battalion Chief Coy Justice said the blaze started in an apartment unit on the ground floor and spread quickly to the second floor.

Justice said it was "fortunate that no one got hurt" given how fast the fire spread.

The fire was under control shortly after 3 a.m. but not before it heavily damaged four apartment units in the two-story building.

The cause of the fire remained under investigation.