SCARBOROUGH, Maine (AP) — Police are honoring a day care teacher in Maine who potentially saved the lives of 25 children when a bus driver suffered a heart attack.

suesmith2/Thinkstock

Police say the 4- and 5-year-olds were on the bus on in Scarborough on Wednesday when the bus driver had a medical emergency and lost control of the vehicle. Police said he had passed out and had his foot on the gas and brake pedals.

Joshua Galvin, a teacher at Toddle Inn Daycare in South Portland, quickly got up and took control of the bus. Police said he brought it safely to a stop and removed the keys. No one was seriously hurt.

Police said the bus driver has received pacemaker installed and is recovering.