BUFFALO, N.Y. — Eight people leaving a party at a downtown Buffalo restaurant were shot early Saturday, four of them fatally, including a Texas man who had returned to his hometown to celebrate his first wedding anniversary, police said.

Managers had decided to close the City Grill in the city’s business district after an altercation inside. The victims were leaving around 2:30 a.m. when a man who had been inside began shooting, police said.

Keith Johnson, 25, of Buffalo was charged Saturday afternoon with four counts of second-degree murder and could face more charges. He was in custody late Saturday afternoon.

Police didn’t know whether Johnson was involved in the earlier altercation and asked witnesses to speak up.

“We need people to come forward,” said Police Commissioner Daniel Derenda, who estimated there were 100 people at the scene when police arrived.

The group was attending a party in advance of a more formal anniversary celebration scheduled for later Saturday, authorities said. The couple, Danyell Mackin, 30, and his wife, Tanisha, married in Texas a year ago and had returned to celebrate with Buffalo-area friends and family, authorities said. Tanisha Mackin was not hurt.

The restaurant is a popular stop for office workers during the week and theater-goers and sports fans at night.

The Mackins had been friends since they were 13 and started dating in 2001, according to a website created to commemorate their marriage and provide details about the celebration.

The couple have a 6-year-old son and a 7-month-old daughter, who was scheduled to be christened today, the website said. The family had moved to Austin, Texas, in 2006, and the Mackins worked for a local bank.

Police identified the other three victims as Willie McCaa III, 26; Shawnita McNeil, 27; and Tiffany Wilhite, 32.

“A senseless, random killing,” said Wilhite’s father, Raymond Wilhite. “This kind of thing just has to stop.”

McNeil, Wilhite’s cousin, “got along with everybody,” McNeil’s mother, Ruby Martin, said. “She knows a lot of people. She didn’t deserve to be killed. I’m pretty sure it wasn’t intended for her.”

Johnson lives about six miles from the restaurant, near the University of Buffalo’s south campus. No one responded to a knock on his door Saturday.

The restaurant posted a statement on its website Saturday expressing condolences to the victims and their families.