A teenager was killed and a baby girl was injured on Saturday in separate shootings in Flatbush, Brooklyn, the police said, one of which happened across the street from a McDonald’s that was the scene of a violent brawl widely seen on social media this month.

The police said they responded to a 911 call reporting a man shot on Flatbush Avenue shortly before 4 p.m. on Saturday. They arrived to find Donel Andrew, 18, lying on the ground with a gunshot wound to the torso.

Emergency medical workers rushed him to Kings County Hospital Center, where he was pronounced dead.

Mr. Andrew was shot across the street from a McDonald’s where a fight between members of a gang known as the Young Savages took place. Video of the brawl spread rapidly on social media and helped law enforcement identify and arrest several of the young women involved in the fight.

Ten minutes earlier and less than a mile away, the police said, a one-year-old baby girl was grazed in the leg by a bullet. The shooting occurred at Foster Avenue and Rugby Road. The child was also transported to Kings County Hospital Center, where she was treated for nonlife-threatening injuries.