Twelve people who died at a religious ceremony were the victims of accidental carbon monoxide poisoning, the state government said Friday.

"They fell asleep thinking they were in a trance," said Baja California state spokeswoman Sara Yolanda Gonzalez.Autopsies completed Friday on the 12 men, women and children whose bodies were discovered Thursday showed they died from carbon monoxide, a state government news release said.

"It was definitely an accident," said Victor Vazquez, a deputy district attorney in Tijuana.

"They had no electricity, only a (butane) gas lamp. It consumed all their oxygen, and they had no windows open," Gonzalez said.

She said the deaths were not related to the religious ceremony that brought the people together at the home in the U.S.-Mexico border city of Tijuana on Wednesday night.

"They had an altar to the Virgin of Guadalupe, candles and holy water, and they chanted The Lord's Prayer," Gonzalez said.

Investigators discarded notions that the worshipers were followers of the devil, the news release said.

Five people who survived the religious meeting remained hospitalized Friday, four in comas. The state had said Thursday that seven people were hospitalized, but revised the figure to five on Friday, saying the earlier number was an error.

Brain tissues from the dead victims have been sent to a San Diego laboratory across the border from Tijuana for additional study.

Earlier Friday, a survivor described the ritual as a purification ceremony conducted with a cardboard likeness of the Virgin Mary and a rope tied with 13 knots.

"People started complaining of stomach pains and some of them began to vomit," said Alfredo Osuna Hernandez from his hospital bed. "Some started to get scared and they started to scream from the pain."

Authorities found the bodies Thursday sprawled on couches, chairs and the floor of a home in El Florido, a shantytown filled with squatter camps.