Six people, including a 17-year-old girl and her six-month-old baby, have been killed in a gun attack in California.

The bloodbath, which is believed to be related to gang crime, happened on Monday night in the town of Goshen, the Tulare County Sheriff said.

Police were called to a home in Goshen at around 3:40 a.m. local time because of multiple shots.

Upon arriving at the scene, officers found two victims on the street and a third in the porch, Sheriff Mike Boudreaux said.

Victims were also found in the building itself.

The 17-year-old and her six-month-old baby were shot in the head.

A seriously injured person was taken to a hospital, but died there.

Sheriff Boudreaux spoke of an apparently "targeted" attack on the family.

There is probably a connection to gang crime.

The authorities had searched the house during a drug raid just a week ago.

"We believe at this point there are at least two suspects," the sheriff said.

Several people would have survived the "terrible massacre".

Goshen is located in inland California about halfway between Los Angeles and San Francisco.

Gun violence is a major problem in the United States.

According to the website Gun Violence Archive, more than 44,000 people were killed by guns in the past year alone.

More than half of the cases were suicides.