Students and a driver escaped injury when a school bus taking them to Merrick Avenue Middle School caught fire Wednesday morning, Nassau County police said.

Just before flames broke out, the bus driver pulled over at Merrick and Kirkwood avenues about 7:40 a.m., according to a student on the bus, who did not want to be identified.

advertisement | advertise on newsday

The student said the driver saw smoke coming from the front of the vehicle and directed about a dozen students onboard to get off the bus. As they stood outside, they saw “flames getting bigger and the smoke thicker,” which is when the driver called the fire department, the student said.

The Merrick Fire Department arrived, and shortly afterward another school bus came to take the students to school, Bellmore-Merrick Superintendent John DeTommaso said in a statement.

A short video shows Merrick firefighters hosing down bright red flames that had engulfed the front of the bus as dark smoke billowed from the back.

The bus had overheated, DeTommaso said.

advertisement | advertise on newsday

“We would first like to say we are extremely happy and relieved that all the children are safe and sound from this morning’s incident. We could not be more pleased with the level of professionalism the driver handled himself with today,” Guardian Bus Company, which services the Bellmore-Merrick school district, said in a statement.