A student has been injured in a shooting at a rural high school in California yesterday and another has been taken into custody, US officials said.

The shooting happened at about 9am local time at Taft Union High School, in a community of fewer than 10,000 people amid oil and natural gas production fields in the San Joaquin Valley, about 193 kilometres northwest of Los Angeles.

The student who was shot was flown to a hospital in Bakersfield, said Ray Pruitt, spokesman for the Kern County Sheriff’s Department.

There was no immediate word on the victim’s condition.

Mr Pruitt said the suspect is also a student and a shotgun was used in the attack.

Kern County Fire Department Eric Coughran told KBAK-TV that another person had suffered some type of injuries in the incident but refused medical attention.

KERO-TV Bakersfield reported that the station had received phone calls from people inside the school who hid in cupboards.

It was not immediately clear how many students are enrolled at the high school.

The Taft shooting came less than a month after a gunman massacred 20 children and six women at Sandy Hook Elementary School in Newtown, Connecticut, before killing himself.

That shooting prompted President Barack Obama to promise new efforts to curb gun violence.

Vice President Joe Biden, who was placed in charge of the initiative, said in Washington on Tuesday that he would deliver new policy proposals to the president by next week.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.