A man who attacked a teenage Syrian refugee on a trolley in San Diego after he heard the victim speaking Arabic on the phone has pleaded guilty to assault and hate crime charges.

Adrian Vergara, 26, faces five years in prison for the October 15 attack. He kept his head down as he entered his plea on Monday after accepting a deal with prosecutors.

The unidentified 17-year-old victim was talking to a friend via FaceTime as he rode the Metropolitan Transit System trolley home from school at around 3pm when Vergara approached him and pulled one of his earbuds out.

'What trash are you speaking?' the assailant asked. 'Where are you from? Are you Mexican?'

When the teen revealed that he is Arab, Vergara proceeded to punch him five or six times while hurling anti-Arab and Islamaphobic slurs.

He then left the trolley car at a station in Encanto. The victim, who suffered minor facial injuries, reported the incident to police.

Detectives tracked down footage that 'corroborated what the boy reported about the attack', San Diego Police Department Lt Shawn Takeuchi said.

Adrian Vergara, 26, attacked a 17-year-old Syrian refugee on a trolley in San Diego on October 15. He kept his head down as pleaded guilty to assault and hate crime charges in court Monday

The unidentified 17-year-old victim was speaking Arabic on the phone as he rode the Metropolitan Transit System trolley home from school when Vergara approached him and asked where he was from. When the teen revealed that he is Arab, Vergara proceeded to punch him five or six times while hurling anti-Arab and Islamaphobic slurs

Vergara was arrested a week later on October 22 for an unrelated misdemeanor drug charge.

Police recognized him as the suspect wanted in connection with the trolley attack.

Court records revealed Vergara's extensive rap sheet with four prior assaults.

In 2012, he was arrested for threatening a man with a billy club and was sentenced to community service. He completed a 12-hour anger management program the following year.

In 2015, Vergara was accused of attacking another man, but the case was dismissed.

In 2016, he was charged with grand theft and burglary for breaking into the Central Library.

That same year he was arrested for violating a restraining order against his ex-girlfriend. He reportedly tried to kick down her front door before calling her and saying: 'If you don't talk to me I'm going to go to your job and cause a scene. I don't care about my life.'

Vergara was charged with carjacking in early 2017, and months later was arrested for assaulting a man. He was ordered to stay away from the MTS Imperial Transit Center as a result.

The most recent records indicate that Vergara violated a court order that was put in place to prevent domestic violence in January 2019.

He is set to be sentenced to five years in prison for the trolley attack on December 5.

Vergara deliberately shielded his face from cameras in the San Diego court room on Monday

The victim issued a statement about the attack last month, in which he explained that his brother had also experienced a hate crime when their family first arrived in America.

'We didn't report it when it happened because we didn't think justice was possible,' he wrote.

'When this attack happened to me on the trolley last week, I decided to file the police report because we can't stay quiet about this.'

He continued: '[My family] came to this country under the belief that we would have civil rights and liberties and safety. When the attack happened to my brother we realized that this wasn't true for everyone.

'There are many people who don't know Arabs and Muslims and believe that we are violent. However, I want to show that this is not true. When I was attacked, I could have fought back.

'However, I chose to stay calm and not fight back. I chose to follow the rules and file the police report in hopes of getting justice.'

The teen said he did not identify himself in the media because 'I am still dealing with the trauma from this and I don't want the attention'.

'However, I urge others who are victims of such attacks to speak up and not stay silent,' he added.

'It is important to seek justice when you experience a hate crime to ensure that such incidents don't continue to happen in our community.'