A Maryland on-duty police officer was hailed a hero after she saved a middle schooler from being struck by a moving vehicle by pushing the child away from the street. A video of the officer's heroic actions was captured by a nearby school bus.

The incident took place Friday in the 200 block of East Cecil Avenue in North East. Corporal Annette Goodyear of the North East Police ended up getting hit by the car herself after saving the child just inches away from the car, ABC 8 reported.

The hair-raising video of the incident shows Goodyear signaling the vehicle to stop as the child attempts to cross the street. Upon realizing that the car isn't stopping, she races to save the child, and the car, which zooms into view, strikes her instead.

The driver then immediately stops as Goodyear is seen lying on the road writhing in pain. The driver and other witnesses then race to help the officer.

The Cecil County Sheriff's Department handled the crash and said that the hero cop was treated at the hospital for minor injuries and released. The child sustained no injuries, WMAR-TV reported. The driver of the vehicle was reportedly cited for negligent driving and failure to stop at a crosswalk, and driving with an expired registration plate.

John Fakner of the North East Police Department told WJZ-TV that the incident happened around 7.30 a.m. ET. "We’re just extremely proud of her actions," she told the outlet. "It was a split-second reaction that saved a child from potential injury. A job well done."

Cecil County Executive Danielle Hornberger said North East Mayor Michael Kline and the rest of the town were all praise for Goodyear. She said the town is "already working on commendations for her bravery and swift action!"

Dr. Jeffrey Lawson, the school district’s superintendent, praised Goodyear on Twitter. "This is what hero police officers do!" the tweet read. "We want to take a moment to recognize Officer Annette Goodyear of the North East Police Department for her heroic actions today," the Cecil County Public School said in a Facebook post.

car crash
Representational image. Pixabay