A woman tried to commit suicide in Costa Mesa by driving her car into a large electrical box behind a shopping center on Harbor Boulevard, police said. Protective steel poles stopped her, and officers pulled her from the vehicle. (Costa Mesa Police Department, Daily Pilot / September 14, 2013)

Homicide detectives are investigating the deaths of two children found inside a hotel Saturday morning after a woman who crashed her car in an apparent suicide attempt in Costa Mesa alerted authorities about the children.

The unidentified woman rammed her vehicle at high speed into steel poles at about 8 a.m. while attempting to crash into an electric vault behind a Home Depot in the 2300 block of Harbor Boulevard, said Sgt. Tim Starn of the Costa Mesa Police Department.

"She was definitely trying to kill herself," he said.

When officers responded, the woman, 42, of San Jose, wouldn't unlock her doors or exit the car, according to a press release from the Costa Mesa Police Department.

When she began strangling herself with an electrical cord, officers smashed a window of the 2006 Honda Accord and pulled her out, police said.

After she was extricated, the woman made statements to police about the two dead children, Starn said.

Those comments led them to a homicide scene at a hotel near Dyer Road and the 55 Freeway, he said.

The gender and ages of the children aren't being disclosed, or how they were killed, pending a coroner's report, said Cpl. Anthony Bertagna, spokesman for the Santa Ana Police Department.

The woman was taken to Hoag Hospital in Newport Beach where she was examined for injuries.

She is being detained and questioned as part of detectives' investigation, according to Santa Ana police.

Costa Mesa police said they also found a propane tank in the passenger side of her car.

— Adolfo Flores and Jeremiah Dobruck

Flores writes for the Los Angeles Times.