Six people were injured in a mass shooting at a public school in California's Oakland city, police said.

The shooting occurred at 12.45 p.m. on Wednesday at the Rudsdale Newcomer High School, Xinhua news agency quoted the police as saying on Thursday.

The victims were two students, a counsellor, a security guard and two people working at the school.

The gunmen entered the school building to target specific people, and fired more than 30 rounds before fleeing in a vehicle.

Six injured in California school shooting
Six injured in California school shootingIANS

Police linked the shooting to conflicts between groups and gangs within the city.

One or more of the shooters likely used handguns with large-capacity ammunition magazines holding more than 10 bullets apiece, which are now banned in California, according to the police.

Surveillance video captured "two specific shooters and one driver", but "we had calls that there could have been up to four", police chief LeRonne Armstrong said during a news conference on Thursday.

Shooting in USA
Police officers work at the scene of a fatal shooting (FIle photo)IANS

As of Thursday afternoon, three of the injured remained hospitalized, The San Francisco Chronicle reported.

Campus facilities will be closed indefinitely while the school district repairs damage, both from the burst of gunfire and from police breaking into rooms, district spokesperson John Sasaki said.

(With inputs from IANS)