SANTA ANA ( — A 25-year-old man appeared in Orange County Superior Court Thursday on murder charges in the killings of two homeless men in Anaheim.

Marvin Magallanes of Anaheim is charged with murder with special circumstance allegations of multiple murders. He is also facing two sentencing enhancement allegations of the personal use of a deadly weapon. His arraignment was continued until Friday.

Magallanes is accused of fatally stabbing 52-year-old Onosai Tavita and 49-year-old Sabah Alsaad, both of whom were homeless, according to Anaheim police Sgt. Daron Wyatt.

Tavita was stabbed to death about 2 a.m., Oct. 27, 2016, at 990 S. Euclid St., Wyatt said. He was sleeping behind a restaurant there when he was attacked, Wyatt said.

Alsaad was sleeping on a bus bench at 1200 S. Magnolia St. about 2:15 a.m., Jan. 27, 2017, when he was stabbed to death, Wyatt said.

About two weeks ago, police developed forensic evidence that pointed to one suspect, Wyatt said. Then, in the early morning hours of May 12, Magallanes walked into the Anaheim police station and allegedly said he wished to confess to murder, Wyatt said.

It is the third multiple-murder case in Anaheim over the past five years.

Itzcoatl “Izzy” Ocampo was charged with killing four transients and two others, but took his own life in jail in November 2013, before he went to trial.

Steven Dean Gordon was sentenced to death in February for his part in the killing of four prostitutes. Police believe there was a fifth victim.

Gordon’s co-defendant, Franc Cano, is awaiting trial.

Magallanes was previously convicted of attempting to crash through the gates of Kylie Jenner’s home in Calabasas.

Last September he was sentenced to 10 days in Los Angeles County Jail for attempting in June of 2016 to use his car to crash through the security gate of Jenner’s former home.

(©2017 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.)