Raychides Sanches answered "Hernandez" and nodded in the direction of the convicted murderer after prosecutors asked him who did the shooting.
Hernandez is charged with two counts of first-degree murder in the deaths of Safiro Furtado and Daniel de Abreu on July 16, 2012. Hernandez has pleaded not guilty.
Sanches testified that the car the three were riding in was stopped at a light when an SUV pulled up. The gunfire immediately began.
Prosecutors say Abreu, the driver, was shot in the chest and that Furtado was shot in the head.
Sanches said he doesn't know if the trio encountered Hernandez earlier that night. Authorities allege Hernandez crossed paths with the three men inside the Cure nightclub and became upset when he was bumped by one of them.
Hernandez is already serving a life sentence for the 2013 murder of Odin Lloyd, who was dating the sister of Hernandez's fiance.