A North Carolina family is thanking their cat for waking them up in the middle of the night, and alerting them to a potentially dangerous situation.

"My daughter woke us up and said the cat is making funny noises, and then she (the cat) passed out," Jeff Wild told WTVD-TV.

Wild's wife forgot to turn off her car and closed the garage door, which led to a buildup of carbon monoxide inside the family's home in Holly Springs last week.

Paramedics were called to the home, where they found high levels of carbon monoxide.

They transported a woman and two children to the hospital for treatment.

Officials said the family didn’t have much time left before the deadly gas would have killed them.

Experts recommend having a carbon monoxide detector inside homes because the odorless and colorless gas can be fatal.