A 19-year-old man shot in Logan Square early Tuesday morning died overnight, according to authorities.

Police said 19-year-old Bernardo Catalan and a 23-year-old were shot together near the intersection of Cortland and Rockwell streets in the Logan Square neighborhood about 1:05 a.m. Tuesday.

The two were in a car following an SUV when someone got out of the SUV and opened fire, hitting the two.

It's not clear what transpired between occupants of the car and SUV but police said Catalan affiliated with a gang and may have been involved in an altercation either before or while following the SUV.

The driver of the car reversed trying to flee the attack, causing significant damage to its rear end, before driving to the Shakespeare District police station a few blocks away.

While the driver was trying to flee, the shooter hit the car's windshield seven times and the hood at least three. Aside from the bullet holes, the car had a flat front passenger-side tire and a dented front end.

Paramedics took the two from the parking lot of the police station to Advocate Illinois Masonic Medical Center, where the 19-year-old was pronounced dead about 9:30 p.m. Tuesday.

No one is in custody and Area North detectives are investigating.

pnickeas@tribune.com | Twitter: @PeterNickeas