“It was a nice family gathering and someone came in and started shooting,” said a woman who emerged from the home at Stanley Avenue and Crescent Street on Sunday but declined to give her name because of the nature of the crime.

The burst of weekend violence came after several days of relative calm across the city, with shootings abating when compared with the same period last year. Since June, the Police Department has sent additional officers to the most violent areas of the city in an effort to stem a rise in shootings this year. One of those precincts is the 75th in East New York, where the nine people were shot and where, despite the additional officers, shootings and homicides have been up compared with last year.

At the same time, the department’s leaders have focused increased attention on the small number of people believed to be behind the shootings, mostly young men with histories of arrests on gun charges and, in some cases, have been shot themselves.

A man who had recently been released from prison, for a 2009 shooting, was killed on Saturday in a barrage of at least 31 bullets in the Glenwood Houses on East 56th Street in the Flatlands section of Brooklyn, the police said. The man, Donnell Smith, ran inside one of the buildings around 1:40 a.m. but was shot in the elevator, the police said.

The shooting in East New York on Sunday was one of two overnight in which multiple people were struck. In the other, in the Bronx, a 20-year-old man, Christian Garcia, was shot and killed and two other people — a 17-year-old girl and a 25-year-old man — were wounded at a playground at Bolton and Lafayette Avenues around 1:30 a.m., the police said. It was not clear if Mr. Garcia was the intended target.