A man facing a murder rap after a Coney Island gunfight may also be charged in the death of a bystander – his “best friend,” the cousin of Knicks star Stephon Marbury, The Post has learned.

Prosecutors are considering a second murder count against Charles Hernandez, 31 – already charged with killing Allen Lewis, 20 – for the death of Marbury’s cousin Yusuf McEaddy, even though McEaddy was killed by Lewis’ gun.

If Hernandez pulled his gun first – prompting the shootout – he could be charged with inadvertently causing the death of McEaddy, a law-enforcement source said.

Witnesses told cops Hernandez did fire first, with a semiautomatic 9 mm handgun, and that Lewis fired back, with an automatic TEC-9, in what may have been on ongoing dispute, the source said.

“The witnesses said those are the bullets that struck McEaddy,” the source said.

Ballistics tests are being conducted to confirm or discredit the account.

Hernandez claims Lewis started the gun battle and hit McEaddy. Hernandez maintains he opened fire only after his best friend was hit, the source said.