Seven people were killed in two related shootings at agricultural facilities in a California coastal community south of San Francisco on Monday.

The incident marked the state’s third mass killing in eight days, including an attack at a dance hall on Saturday in which 11 people died during Lunar New Year celebrations.

Officers arrested a suspect in Monday’s shootings, 67-year-old Chunli Zhao, after they found him in his vehicle in the car park of a sheriff’s substation, San Mateo County Sheriff Christina Corpus said.

She said Zhao was an employee at Mountain Mushroom Farm and that the only known connection between the gunman and his victims was that “they may have been co-workers”.

Four people were found dead and a fifth injured with gunshot wounds at a farm, and officers found three other people killed at another location several miles away, the Sheriff’s Office said.

President Joe Biden said: “For the second time in recent days, California communities are mourning the loss of loved ones in a senseless act of gun violence. Even as we await further details on these shootings, we know the scourge of gun violence across America requires stronger action.”

The killings occurred on the outskirts of Half Moon Bay, a city about 30 miles south of San Francisco. Ms Corpus said the two locations were nurseries, but it was not immediately clear how they were connected.

Hours later, one person was killed and seven others injured at an Oakland petrol station in another shooting incident in the San Francisco Bay Area on Monday, police said.

Northern California Fatal Shooting
Police investigate the scene of the mass shooting in Half Moon Bay, California (Karl Mondon/Bay Area News Group/AP)

Officers were sent to the scene on Macarthur Boulevard just after 6pm and learned there had been a shooting between several people, a police statement said.

The officers found shell casings at the Valero petrol station but no victims. However, dispatchers learned that several people had taken themselves to local hospitals for treatment to gunshot wounds.

One person died and the others were in stable condition, police said.

No arrests were made and no other details were immediately available.

California Gas Station Shootout
Police at the scene of the Oakland shooting (Jane Tyska/Bay Area News Group/AP)

The new year has brought a shocking string of mass killings in the US – six in less than three weeks, accounting for at least 39 deaths.

Three have occurred in California since January 16, according to a database compiled by The Associated Press, USA Today and Northeastern University. The database tracks every mass killing – defined as four dead not including the offender – committed in the US since 2006.

Some workers at one facility lived on the premises and children may have witnessed the shooting, she added.

She said officials have not yet determined a motive for the shooting.

Half Moon Bay vice mayor Joaquin Jimenez said the victims included Chinese and Latino farm workers.

The Sheriff’s Office first received reports of a shooting just before 2.30pm local time and found four people dead from gunshot wounds and a fifth person injured at the first scene.

Shortly afterwards, officers found three more people dead from gunshot wounds at a second location nearby, Captain Eamonn Allen said in a news release.

About two hours after first responding, a sheriff’s deputy noticed the suspect, Zhao, in his car parked outside a sheriff’s substation in a row of shops and arrested him, recognising the vehicle by its licence plate.

Northern California Fatal Shooting
First responders at one of the crime scenes (Nhat V Meyer/Bay Area News Group/AP)

A video captured by Kati McHugh, a Half Moon Bay resident who witnessed the arrest, showed three officers approaching a parked car with drawn weapons.

Zhao got out of the car, and the officers pulled him to the ground, put him in handcuffs, and led him away. A weapon was found in his vehicle, officials said.

The sheriff’s department believes Zhao acted alone.

“We’re still trying to understand exactly what happened and why, but it’s just incredibly, incredibly tragic,” said state Senator Josh Becker, who represents the area and called it “a very close-knit” agricultural community.

Aerial television images showed police officers collecting evidence from a farm with dozens of greenhouses.

Half Moon Bay is a small coastal city with agricultural roots, home to about 12,000 people. The city and surrounding San Mateo County area is known for producing flowers as well as vegetables like Brussels sprouts. The county allows cannabis farming in certain areas.

Northern California Fatal Shooting
Police tape near the scene of one of the two related shootings in Half Moon Bay (Jeff Chiu/AP)

It is a majority white community and about 5% of the population is Asian, according to census data.

“We are sickened by today’s tragedy in Half Moon Bay,” said San Mateo County Board of Supervisors president Dave Pine.

“We have not even had time to grieve for those lost in the terrible shooting in Monterey Park. Gun violence must stop.”

California Governor Gavin Newsom tweeted that he was “at the hospital meeting with victims of a mass shooting when I get pulled away to be briefed about another shooting. This time in Half Moon Bay. Tragedy upon tragedy.”

On January 16, a teenage mother and her baby were among six people killed in a shooting at a home in California’s Central Valley.