Mom charged with arson, child endangerment after son was found tied up with plastic bag around head in house fire

Police were putting out the flames when they made the discovery.

A California mother has been charged with felony child endangerment and arson after firefighters discovered her 3-year-old son trapped inside their burning home, which police say she set aflame.

Maricela Magana Ruiz, 47, allegedly left her son alone in a bedroom after putting a plastic bag over his head and tying his hands, according to a press release from the Santa Paula Police Department.

Firefighters discovered the little boy as they were trying to put out the fire on Sunday in the Santa Paula home, authorities said.

Ruiz was also found tied to a bed in the home, according to police.

Both were discovered after she called 911 to report the fire at 6:10 p.m. on Sunday. The little boy was taken to the hospital for smoke inhalation and has since been released to child protective services, authorities said.

Detective Allen Macias told ABC News on Tuesday that he did not know "what was going through her mind at the time."

He said that while a concrete motive hasn't been established, Ruiz was going through a "pretty nasty custody battle" with the boy's father.

It was not clear how long before she set the house aflame that she called 911, but when firefighters arrived "all three stories [of the home] were filled with black smoke," Macias said.

Ruiz was initially charged with only felony child endangerment, but on Monday night investigators found evidence to charge her with arson as well.

She was booked into the Ventura County Jail. Her bail was initially set at $50,000 for felony child endangerment, but is now at $500,000.