A 14-year-old boy charged with brutally beating an 87-year-old woman at a senior housing facility was arrested following a dayslong search in California, authorities said.

The assault occurred during an apparent robbery at the Camelot Independent Living complex in the Riverside County city of Hemet, police said.

"It's an 87-year-old victim minding her own business in the safety of her own home," police Lt. Dean Evans told the Riverside Press-Enterprise.

The woman remained hospitalized Friday in critical but stable condition, police said.

Investigators said it appeared she was not specifically targeted. No further details were released about the attack.

The teen was taken into custody Thursday night at a hotel in Temecula, Evans told the newspaper.

A 15-year-old boy was arrested on April 17, the day of the attack. He was being held without bail at Southwest Juvenile Hall.

Both were charged earlier this week with burglary, torture, elder abuse and assault with a deadly weapon, said John Hall, a spokesman for the Riverside County district attorney's office.

Officers searching for the 14-year-old released a flier with his name and photograph.

A police news release said the department does not usually identify juvenile suspects, "but due to the serious nature of this case an exception was made in an effort to protect the public and aid in the capture of the suspect."

Evans said the boy had extensive contacts with police in the past involving curfew issues and crimes.

Police have contacted family members, but would not say whether they have cooperated.

The Associated Press is not naming the boy because of his age.