The shooting in the Southern California city on Tuesday night occurred at a Halloween party, an official said.

Credit...Scott Varley/The Orange County Register, via Associated Press

Three men were fatally shot and at least nine other people injured in a shooting in Long Beach, Calif., on Tuesday night, the authorities said.

The shooting occurred on the 2700 block of Seventh Street in the Southern California city during a Halloween party at a private home, according to fire officials and local news outlets.

The motive for the attack was not immediately clear. The police said they were looking for several suspects, according to KTLA 5, a local news station.

The Long Beach Fire Department said in a post on Twitter that it responded to the shooting shortly before 11 p.m.

A spokesman for the Fire Department, Jake Heflin, told reporters that firefighters had arrived to a scene “full of chaos.”

“There were 12 patients involved in this incident,” Mr. Heflin said. The nine injured people were taken to hospitals, but their condition was not immediately known.

Aerial footage showed firefighters triaging victims on yellow and red tarps outside a home and next to a nail salon. Neighbors and others said they had heard about 20 gunshots, and told the local news media that they initially thought they were fireworks.

Federal lawmakers, law enforcement officials and local communities have grappled with a response to mass shootings in the United States, with many debates focusing on gun control laws and better background checks on gun buyers.

Over the summer, 26 mass shootings left 126 people dead. In July, three people were killed and more than 10 injured in a shooting at a food festival in Northern California.