(CNN)When Deputy Will Kimbro stopped a car for speeding last month, he didn't know he would end up saving a newborn's life.
The dramatic episode, which took place during a routine patrol in Berkeley County, South Carolina on June 11, was caught on a newly released video recorded by the officer's body camera.
As Kimbro stopped the vehicle, the driver got out of the car and shouted that the baby stopped breathing after drinking from a bottle, according to the Berkeley County Sheriff's Office.
Her body was limp and blueish from lack of oxygen, the sheriff's office said.
After asking the mother, who was sitting on the passenger's seat, for the baby's name, the deputy puts the baby on her lap, checks the pulse, and starts massaging her heart as part of lifesaving first aid.
"Come on baby, cry for me, cry for me," he can be heard saying. "Open those eyes, sweetheart."
As the baby starts crying, Kimbro says: "As long as she's crying like that she's breathing. I want you to cry. Come on."
"I think she's gonna be OK. She's breathing," the officer says to reassure the mother.
He keeps performing CPR because her breathing goes on and off, Kimbro says in the video.
Finally, the baby's chest starts moving, meaning that she's breathing again on her own. An emergency medical team arrives, and Kimbro and the mother recount what has happened.
The baby was taken to a local hospital for observation and released, said sheriff's spokeswoman Carli R. Drayton.
"As far as we know, the baby has been doing well," Drayton said.
"Because of Deputy Kimbro's steadfast, professional and heroic response, the 12-day-old baby was able to live," the sheriff's office said on Facebook.
Kimbro was awarded a medal for his heroic actions.
CNN has reached out to Kimbro for comment.