A police officer administered emergency CPR on what he thought was an infant trapped in a hot car turned out to be a life-like doll.

Lieutenant Jason Short responded to a 911 call about a baby left alone in a car parked near a Walmart in Keene, New Hampshire.

In the car he saw a motionless baby with a blanket and a bottle.

He smashed the window with his baton to save the infant. The CPR, however, did not work. He checked for an obstructed airway and called for an ambulance.

“And I went to put my finger in its mouth and it was all resistance,” he said to WMUR-TV. “And I’m like, ‘This is a doll.’”

Carolynne Seifert, the doll’s owner, said she bought it for $2,000 as a way to cope after the loss of her son who died in 2005 from Hunter’s disease.

The dolls can cost between $30 and thousands of dollars. They are painted to have a life-like, veiny look, with human hair and filled with pellets to simulate the weight of a real baby.

“I’ve been laughed at and embarrassed by all the fuss,” Ms Seifert told WMUR. “You can’t know how people choose to deal with their losses in life.”

Psychiatrist Gail Saltz wrote in Today in 2008: “For some women, such a transitional object eases them into ways of finding more external methods of dealing with their needs of caretaking and loving a being who loves them back.

“It is the concretised fantasy of getting unconditional love.”

Keene's police chief, Brian Costa, told the Union Leader that he suported Mr Short’s actions, but that the police would pay to fix Ms Seiffert’s broken window.

So far this year, 27 children have died from heatstroke after being left in cars, according to a database from the department of meteorology and climate science at the San Jose State University. There have been 688 such deaths since 1998.