Northern California prosecutors on Friday charged a 21-year-old former university student with two counts of murder and one of attempted murder in connection with a series of stabbings near the University of California, Davis, campus.
One of the victims was Karim Abou Najm, 20, who moved to the US from Lebanon in 2018.
He was stabbed last weekend as he was walking home from an awards ceremony.
Police arrested Carlos Dominguez near the city park where he was alleged to have killed Mr Abou Najm. He has been in jail since early on Thursday.
Yolo County prosecutors said Mr Dominguez was eligible for a life prison term without the possibility of parole or the death penalty.
He is accused of fatally stabbing two people as well as a third victim who is now recovering.
News of his arrest was a relief to students and residents shocked by the vicious stabbings, which Davis Police Chief Darren Pytel described as particularly brutal and brazen.
Police had fanned out to investigate after the body of David Breaux, 50, was discovered at a park near the campus on April 27.
The second victim, Mr Abou Najm, a senior at the university, was found on Saturday at another city park.
“We moved from Lebanon in 2018 when the situation in Lebanon was a little bit starting to go in not the right direction,” Mr Abou Najim's father told KCRA.
“We came here hoping for safety.”
On Monday, Kimberlee Guillory was attacked while inside her tent but survived. Both Mr Breaux and Ms Guillory were homeless.
Davis police have not provided a motive and it is unclear if the suspect knew the victims.
Mr Dominguez was a student at UC Davis until April 25 — two days before the first victim was found — when he was let go for academic reasons, the university said.
He was a third-year student majoring in biological sciences. Previously, he attended Laney College in Oakland.
Chief Pytel said Mr Dominguez went voluntarily with police for questioning. They found a large knife in his backpack.
The Associated Press contributed to this report