At least four people have been killed and three are seriously injured in two shootings at Half Moon Bay, in California, it is reported.
People were found dead at a farm off San Mateo Road (Highway 92), south of San Francisco, and others at a nearby farm while there are also thought to be three victims with serious injuries.
The suspected gunman was first reported to be on the run with police hunting for a man in a red SUV and people were told to avoid Highway 92 between Highway 1 and 35.
But now the alleged shooter has been taken into custody, police have confirmed.
Television images show a man being handcuffed by police but it is unclear if this is the attacker.
Three injured from the shooting were taken to Stanford Medical Center by helicopter and their latest status has not been revealed.
Local police tweeted: "The Sheriff's Office is responding to a shooting incident with multiple victims in the area of HWY 92 and the HMB City limits.
"Media is requested to approach from the north and stage at the Half Moon Bay substation at 537 Kelly Ave. in Half Moon Bay."
A later message stated: "*Update* Suspect is in custody. There is no ongoing threat to the community at this time."
One victim is believed to be at the Mountain Mushroom Farm off Highway 92, near Main Street, close to the centre of Half Moon Bay, while a further three were discovered at Rice Tucking-Soil Farm nearby, police sources have reportedly told ABC7 News.
Holy Families children centre close by is on lockdown.
A man, possibly the suspect, was seen being ordered to get out of a car by police and then being forced to the ground before being handcuffed and taken away.
There is a major police presence in the area and people have shown images on social media of long queues of traffic.
The areas were the incidents have been taped off and police can be seen speaking to other workers at the farms.