CHARLOTTE, N.C. — A dog was rescued from a house fire just before the roof collapsed Thursday night in southwest Charlotte.

It happened around 8:30 p.m. in the 15000 block of Wiltshire Manor Drive. It took nearly 30 firefighters to get the flames under control in about 25 minutes.

Officials said one person was treated for smoke inhalation and transported by Medic.

NBC Charlotte learned on the scene there were three people inside the home when the fire broke out.

A neighbor, Chase Thomas, was driving by as the mother and daughter ran out, with the father not far behind them. Once they realized the family dog was still inside, the dad and Thomas ran back in the house.

"Bill ran back inside to go after the dog, so then I went after Bill just in case with a flashlight, then we got to the top of the floor, and we were looking for the dog, and we couldn't hear the dog," said Thomas. "Finally we heard some scratching noises in the far left of the room, and we were able to get the dog out of there, and that's when the roof collapsed, and the fire started to spread toward the other side of the house."

The cause of the fire is under investigation.

Sign up for the 5 Things to Know Newsletter