LOS ANGELES (CBSLA.com)   —  Authorities said a mentally ill homeless man beat an elderly man in downtown LA Saturday afternoon.

The unidentified elderly man was taken to a hospital and is in critical condition, officials said.

READ MORE: Motorcycle Collides With Sheriff's Patrol Car On Interstate 105

A security guard reportedly came to the elderly man’s aid and had to use pepper spray on the homeless man to stop the attack.

The victim was attacked about 3:30 p.m. Saturday in the area of Grand and Olive streets, according to Sgt. J. Sterling, watch commander at the Los Angeles Police Department’s Central Station.

The attack appeared to be random, according to Sterling, who said the suspect, who has mental issues, walked up to the victim and beat him up.

READ MORE: Meeting Held To Help Curb Rising Violent Crime In Melrose Corridor

The security guard, who was stationed at a Whole Food Market parking lot across the street, intervened. He was able to subdue the homeless man after using pepper spray. He held the man until police arrived.

The guard asked the homeless man what his problem with the elderly man was and he replied the senior tried to rape him.

(©2016 CBS Local Media, a division of CBS Radio Inc. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. Wire services contributed to this report.)

MORE NEWS: FDA Authorizes Pfizer COVID-19 Booster Shots For Seniors And Others At High Risk