A Prince George’s County police officer performed CPR to help save a 3-year-old boy’s life Thursday afternoon, after the child got tangled in window blind cords at his Accokeek home and stopped breathing, officials said.

Officer Ariel Acosta sped away from a traffic stop after police were dispatched to the 15000 block of Livingston Road about 5p.m., when the boy’s family found him entangled at the home.

The boy had stopped breathing and had turned blue by the time Acosta arrived, officials said. The 5-year police veteran performed CPR and resuscitated the boy by the time an ambulance crew arrived.

The child was taken to a hospital, where officials said he was alert and talking.

Authorities credit Acosta for saving the child’s life.

“I believe this child would have died if not for the quick response & actions of this police officer,” said Mark Brady, a fire department spokesman.