LOS ANGELES — A man accused of using a motorized scooter in a fatal attack on a woman has been charged with murder, according to the Los Angeles County District Attorney's Office.

Amad Rashad Redding, 27, who is described as a transient, was charged with one count of murder and faces a sentence of up to life in prison if convicted, the DA's office said in a statement Wednesday.

Redding is accused of attacking Rosa Elena Hernandez, 63, at random as she walked on a sidewalk in Long Beach on Monday. He knocked her to the ground and stomped on her before grabbing an electric scooter and hitting her with it, according the district attorney's office.

"She was walking calm, and all of the sudden encounters someone who is attacking her — that's not fair, because she didn't provoke him," her husband, Victor Hernandez, told NBC Los Angeles this week.

Hernandez died of her injuries after the midday attack, Long Beach police have said.

Redding spent time in a mental institution in Louisiana after an arrest in January in which he was accused of setting a fire inside his family's home, authorities in that state and in Long Beach said.

The Louisiana Office of the State Fire Marshal said in a statement in February that Redding admitted to starting a fire inside his family's Opelousas home. He had allegedly made threats to relatives to set the home on fire, the statement said. He was the only person in the home at the time of the Jan. 21 fire and suffered third-degree burns to his hands, the fire marshal's office said.

The Louisiana fire marshal's office said that Redding was transferred to a mental health facility in New Orleans and then was booked in jail on Feb. 6 following his release.

The St. Landry Parish clerk of court’s office said that the arson case is still open but Redding posted $5,000 bail Feb. 7. It was unclear when or how he came to Southern California.

Redding is being held in lieu of $2 million bail in Monday's attack in Long Beach, and he is scheduled to be arraigned May 29, the district attorney’s office said. It was not clear Thursday if he had an attorney who could speak on his behalf.

The attacker fled after the deadly assault, and a suspect later identified as Redding was taken into custody by Long Beach police at a local business about 4 1/2 hours after the incident, police said.