A 21-year-old man was sentenced Wednesday to life in prison without parole for beating to death a University of Southern California electrical engineering graduate student from China who was walking to his off-campus apartment.

Andrew Garcia, who was convicted of first-degree murder and other charges earlier this summer, was sentenced by Los Angeles County Superior Court Judge George Lomeli. Garcia also was convicted of robbery, attempted robbery and assault with a deadly weapon. A so-called special circumstance allegation of murder during an attempted robbery was found to be true.

Four people attacked 24-year-old Xinran Ji, using a baseball bat and wrench, as he walked home after a late-night study session on July 24, 2014, authorities said. Ji managed to get to his apartment, where a roommate found him dead hours later.

Garcia’s co-defendant, Alejandra Guerrero, 19, was convicted last October of first-degree murder for her role in the killing, with jurors finding true the special circumstance allegation of murder during the commission of an attempted robbery, along with an allegation that she personally used a wrench during the attack on Ji, according to Fox 11 LA.

Guerrero — who is awaiting sentencing and also faces up to life in prison without parole — was also found guilty of one count each of robbery, attempted robbery and assault with a deadly weapon for attacking a man and woman at a state beach about two hours after targeting Ji.

Garcia was convicted of the same three charges stemming from the state beach attack.

Two other young men — Jonathan Del Carmen, 22, and Alberto Ochoa, 20 — still are awaiting trial in Ji’s killing.

Ji’s family wept during the sentencing. His father, Songbo Ji, sobbed as he told the court in Mandarin that his son was killed viciously.

“People like our age are now prepping their daughter’s and their son’s wedding, and their life is full of joy. But every day instead for us we are paying tribute to our son, crying,” the father said through an interpreter.

The Associated Press contributed to this story. 

Click for more from Fox 11.