The victim was walking near Monte Vista Avenue and McClellan Street with some female friends when he noticed three male teenagers trailing behind them around 9:25 p.m., Vacaville police said.
When suspects started walking quickly, the teen feared they would attack him and he darted onto the campus of the school, located at 100 McClellan St., police said.
The suspects chased after the teen and surrounded him. One pulled out a knife and the suspects started to beat him, according to police. The suspects then stole the teen's cellphone and shoes before running away.
One of the victim's friends called 911, and Vacaville police responded and detained the suspects. The victim's phone was found on the ground where they were caught.
Officers arrested Jesus Lopez, 18, on suspicion of robbery and criminal conspiracy. He was booked into Solano County Jail.
The other two suspects, ages 16 and 17, were arrested and booked into Juvenile Hall on suspicion of robbery and criminal conspiracy. Their names will not be released because they are minors, police said.
Investigators are looking into the suspects' gang affiliations to determine if the attack was gang-related.