Portland police have arrested a man they believe shot and injured four people outside an alternative high school in Portland, Oregon, on Friday.

The unnamed 22-year-old suspect was arrested after a vehicle was stopped at North Interstate Avenue and Going Street at around 1:30 a.m. on Saturday, the Associated Press reported. A handgun was recovered from the car.

Investigators then carried out a search warrant at an apartment about five blocks from Rosemary Anderson High School, where the suspect apparently open fired at around 12 p.m. after getting into a dispute, witnesses said.

"Based on the investigation thus far, the shooting appears to be gang-related," Sergeant Pete Simpson said according to the AP.

The shooting, which took place around the corner from the school, wounded 20-year-old David Jackson-Liday, 17-year-old Labraye Franklin and 16-year-old Taylor Michelle Zimmers, who is in critical condition. The other two victims are also at a hospital in fair condition, NBC News reported.

Another 17-year-old, Olyvia Batson, was grazed by a bullet and was treated at the scene.

The victims, who are all either students or attend programs at the school, were able to make it to the school after the shootings for help. Rosemary Anderson High School admits at-risk youth, such as those who have been expelled, dropped out or are homeless.

Portland has a history of gang violence, including a rise in crime over the summer that involved the deaths of two men and a 5-year-old being shot in the leg, the AP reported

Police said they "feel comfortable saying this is a gang-related shooting based on some of the people involved."

"There was some kind of dispute between the shooter and some people," Simpson told the AP. "We don't know if it was (with) all the victims or one of the victims."