A spate of shootings over the weekend spilled into Monday, the police said, when two men opened fire on a crowd in Brooklyn and wounded five people, including a pregnant woman whose fetus later died.

The violence erupted shortly before 11 p.m., as the two armed men emerged from an older model sport-utility vehicle and fired a volley of bullets in front of a residence on Dwight Street in Red Hook, police officials said.

Two men and three women — including the pregnant woman, identified by relatives as Special Houston, 19 — fell wounded as the gunmen climbed back into their vehicle, with another person at the wheel, and sped off, police officials said, leaving the street littered with .40-caliber shell casings.

Detectives said they believed the attack, like another shooting at a party in the East New York neighborhood a day earlier, was fueled by gang violence.