LITTLE FERRY, N.J. (CBSNewYork/AP) — A fire took the life of a 5-year-old girl and her grandmother in their Little Ferry, New Jersey home late Tuesday, and officials were investigating the blaze a day later.

As CBS2’s Ali Bauman reported, a police officer happened to be driving by when he heard an explosion, and people started jumping out of windows.

Several people were trapped on the second floor at 109 Washington Ave. in Little Ferry, and were saved by police and firefighters after the blaze broke out around 11:30 p.m. Tuesday.

“We just started trying to break into windows, and the victims started jumping out windows, and pulled several people out of the building,” said Little Ferry police Lt. Chris Boel.

Boel said when he arrived, all he could see was black smoke engulfing the building.

“Driving down the road and as I was passing this house, I heard a big ‘pop’ — it was some type of explosion. Not sure if it came from the garage or the cars parked in the driveway,” said Boel. “The whole house was engulfed in flames.”

Boel grabbed a ladder from a nearby house and began to rescue several people, WCBS 880’s Marla Diamond reported.

“Got a ladder to the second floor and were able to pull out some people out of top floor also,” he said.

Three families lived in the building that caught fire. On the bottom floor, a father helped his three daughters escape before jumping or falling out himself.

“One father was actually holding his children out the window and dropping them down, and the officers were breaking their fall and trying to catch them as best they could,” said Little Ferry police Chief Ralph Verdi.

The children were all taken to the hospital, while their father was also hospitalized and in back surgery on Wednesday. The children’s grandfather was grateful.

“Thank God everybody’s alive,” said Pedro Rucero. “That’s more important to me.”

Police said one woman was forced to jump from the third floor, leaving a 5-year-old girl and her grandmother inside. Neighbor Ernest Matthews dragged the woman away from the burning building, while firefighters rescued the grandmother and child.

Authorities say the girl died at a hospital Wednesday morning. Her name has not been released. Her grandmother was pulled out of a window and is in critical condition with burns.

Authorities said the girl’s grandmother also later died.

As WCBS 880’s Peter Haskell reported, a half dozen balloons and a white teddy bear were left in front of the home as a tribute to the girl who died. Neil Smith came with the neighbor who brought the balloons.

“I think it’s a tragedy,” Smith said. “I think it’s a sad tragedy — a little girl passing away.”

Neighbors said the building lacks a proper emergency escape route.

“I met a couple that lived there, you know, within the past year, and they said that they had complained to the landlord that there was no way out if something would have happened,” said neighbor Rasheema Smith.

Three police officers who initially responded to the scene were treated for smoke inhalation.

The cause of the fire was under investigation late Wednesday.

(TM and © Copyright 2016 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2016 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)