PHOENIX -- A former student shot three people Thursday in a computer room at a Phoenix community college, injuring one of them critically, authorities said. The gunman fled but a suspect was arrested nearby.

The shooting at South Mountain Community College was part of a running dispute between the suspect and one of the victims, said Sgt. Andy Hill, a spokesman for the Phoenix Police Department.

"This was not a random shooter going around the campus shooting," Hill said, noting that two of the injured people were struck by stray bullets.

The suspect was identified as Rodney Smith, who police said was a former student at the college. Details on when he attended the school were not immediately available.

Smith, 22, was arrested at a home a few kilometres away within a half-hour of the first 911 call about the shooting, police spokesman Reuben Gonzales said.

Also arrested at the home were Smith's parents and three other people on charges of interfering with an investigation and failure to obey a police officer, Gonzales said.

Yessenia Lara, an 18-year-old student who witnessed the shooting, said the gunman was one of two men who had been fighting in the computer building.

"I saw someone get punched and then I heard three shots after that. Everybody basically ducked, and the shooter got away," Lara said, adding that the victims were yelling in pain.

Firefighters took the victims to the hospital, said Mark Faulkner, a division chief for the Phoenix Fire Department. Their identities and information on their injuries were not released.

A 19-year-old man was in critical condition at Maricopa Medical Center, while a 20-year-old woman was upgraded from critical to stable condition Thursday night and a 17-year-old boy was in stable condition, hospital officials said.

College spokesman Robert Pryce said the school was in lockdown for about an hour. About 20 to 30 people were in the computer lab during the shooting and as many as 300 people were on campus, he said. The computer lab is open to the public.

An electronic sign outside the school said all classes were canceled Thursday and students could be seen leaving the campus calmly about 90 minutes after the shooting. Pryce said the campus would be closed on Friday, which is typical during the summer.

Situated at the base of Phoenix's South Mountain, the college has more than 8,000 students. Most students are seeking associate degrees and certificates of completion.