A Chinese family's electric scooter exploded while being charged at home, leaving a man to grab his son and flee along with the family dog before the bike burst into flames.

The explosion was caught on video — shot by the family's surveillance camera installed in their living room and released by a Chinese Fire Department — and showed the whole family were sitting at home when smoke came out of the scooter being charged in the living room, accompanied by large noises.

A man tried to disconnect the charger, but when the smoke got heavier he took his child and escaped the room.

The family dog also rushed away from the scooter.

Seconds later the scooter exploded into a ball of flames.

The flame burns brightly enough to overload the camera sensor before the blaze starts to slow down.

Viewers' comments praised the man's fast response to the accident.

Smoke from burning batteries is highly toxic, and people exposed to it can suffocate in mere seconds, according to firefighters in Beijing.

Zhang Wei, a captain of Beijing's Shijingshan District firefighters, said it is important for residents to learn some basic responses to smoke and fire-related accidents.

Reuters