Separate shootings in Brooklyn and Queens on Sunday afternoon left two people dead, including a teenager, police and fire officials said.

The teenager, Khalil Bowlin, was killed during a shooting in Jamaica, Queens. The police said that shortly before 3:20 p.m., a gunman in a blue car pulled up and opened fire on Mr. Bowlin and an 18-year-old as they stood in front of 143-07 Lakewood Avenue.

Mr. Bowlin, 17, was struck in the head, and the other person was shot in the leg before the driver sped off, the Police Department said. Mr. Bowlin was pronounced dead at Jamaica Hospital, where the older teenager was in stable condition, the Fire Department said.

The police said Mr. Bowlin had been arrested 10 times, most recently in February on charges of criminal possession of a weapon. In the last two years, he has faced charges of weapons possession, robbery and tampering with evidence, the police said.