One family is happy to see their dog recovering.

The animal had become trapped in the Massachusetts family's house after a large fire broke out. 

Fortunately, local firefighters were able to get the blaze under control enough to enter the still-burning building and pull the animal out before it suffered any serious injuries.

The Westport Fire Department posted a press release about the incident on its Facebook page, along with several images of the burned building.

When firefighters arrived on the scene around 1:30 a.m. on Sunday morning, they were informed that everyone had made it out of the house except for the family's pet golden retriever, according to the release. 

MAKESHIFT ANIMAL SHELTER NEAR UKRAINE-POLAND BORDER STRUGGLES TO HELP ABANDONED PETS

Flames and smoke were visible in the rear of the house on both the first and second floors.

Captain Martin and FF Tabares worked to get the fire under control from outside the house, the release noted. Eventually, they were able to get it under control — and then entered the building to search for the dog, even though flames were still present.

Westport Fire Department house fire

Firefighters entered the still-burning house to rescue the family's trapped dog. (Westport Fire Department)

The rescue workers found the dog on the second floor, where it was in a semiconscious state.

Fortunately, once the animal was brought outside, away from the heat and smoke, it quickly became alert and was able to stand on all fours.

FOLLOW US ON FACEBOOK FOR MORE FOX LIFESTYLE NEWS

The family has taken the dog to the vet for further inspection, but the animal appeared to be recovering quickly and is expected to make a full recovery.

Westport Fire Department house fire dog rescue

It's believed that a heat lamp that was used to keep pipes from freezing played a role in starting the fire. (Westport Fire Department)

The blaze was possibly caused by a heat lamp that was being used to keep pipes from freezing, the fire department said. 

CLICK HERE TO GET THE FOX NEWS APP

The fire damaged multiple floors of the house and made its way all the way up to the attic.