A man was shot and killed, and his friend was injured at a Detroit gas station, when a customer opened fire after an argument with a clerk over a $4 purchase.

The alleged shooter, Samuel McCray, 27, has been charged with murder and attempted murder in the Saturday gunfire incident. 

The shooting occurred around 3 a.m., when McCray tried leaving the gas station with $4 worth of items. The electronic purchase had been rejected, and the clerk locked the door, prosecutors said. McCray became angry and threatened to shoot everyone inside unless the door was unlocked, authorities said. 

MICHIGAN COPS FACE WILD CLAIMS THEY BET ON SEX FROM COP DUBBED ‘LAWSUIT WAITING TO HAPPEN': REPORT

Detroit gas station shooting

David Langston, left, and Gregory Kelly, right, was shot at a Detroit gas station. Kelly was killed.  (WJBK)

Friends David Langston and Gregory Kelly were also inside after celebrating Cinco de Mayo that evening, FOX Detroit reported. Langston said he overheard the argument between McCray and the store clerk. 

"He (the clerk) locked the door. We were like let us up out of here, we don't have anything to do with this," he said. "The guy like, 'If you don't unlock this door, I'm gonna shoot everybody in here.' Please man don't shoot us we don't got nothing to do with this, man.' And my friend said something like, ‘Man, he ain’t gonna shoot us, let us up out of here.' And he started shooting."

CLICK HERE TO GET THE FOX NEWS APP 

Langston was shot in the back and arm. Kelly was killed. Another man was also injured in the shooting. 

"I ran to my best friend, but he was gone," Langston, 37, said of Kelly, who he'd known since grade school. 

The clerk unlocked the door after the shooting and McCray fled, prosecutors said. He appeared in court Wednesday and was denied bond. 

The gas station has been shot down because it did not have a business license, the news report said.