A family in Upton is safe this weekend after a quick-thinking police officer managed to wake them up and alert them to late night fire engulfing their home’s garage.

“Police department,” Officer Matthew Rankins can be heard yelling on his car’s dashcam video, banging loudly on the door of the Hopkinton Road home. “Your garage is on fire. You got to get out of the house.”

Authorities said Rankins spotted the fire while on a late night patrol around 2 a.m. Saturday morning.

All the family members, including pets, made it safely out of the home.

The Fire Department managed to keep the blaze contained to the garage, authorities said.