A 39-year-old man died Thursday night after being shot in the head by a 14-year-old on an MTA bus, the NYPD said.

The victim was taken to Woodhull Hospital after the shooting on the B15 bus at Lafayette Avenue and Marcus Garvey Boulevard in Bedford-Stuyvesant. The gunman was arrested and has been charged with murder in the second degree, criminal possession of a weapon and criminal use of a firearm, police said Friday. He has been charged as a minor.

Police identified the victim on Thursday night as Angel Rojas, 39, of Brooklyn

The gunman and the victim were on the bus at the time of the attack, the NYPD said.