A 33-year-old Oakland man has been found guilty of shooting his friend dead during an alcohol and cocaine-fueled argument over the existence of God.

Douglas Yim, who now faces 126 years to life in prison when sentenced in November, killed 25-year-old Dzuy Duhn Phan in April 2011 after a night of drinking alcohol, smoking marijuana and snorting cocaine.

A third man, Paul Park, testified that Phan and Yim began discussing God as they played video games, with Phan verbally provoking Yim about his belief in God and asking him where God was when he lost a game.

Download the new Independent Premium app Sharing the full story, not just the headlines

Mr Phan also raised the subject of Yim's father's death from a stroke at which point a furious Yim hurled the console controller at the television and retreated to his bedroom to fetch an assault rifle. He returned to the room with his AR-15 rifle and shot Phan, who was reportedly an atheist, six times.

One of the shots was fired at most a foot away from the side of Phan's head. Mr Park was also shot in the finger as he put his hands up in an effort to stop Yim shooting.

Patch reported that prosecutor Allyson Donovan said Yim and Phan were friends but that a conversation about the existence of God eventually sparked the shooting, which she described as "extremely senseless."

Yim told Alameda County Superior Court during the trial: “I was really drunk that night” and said he remembered just the first and last shots he fired.

Yim had also told the court he had fired the gun in self-defence after seeing Phan holding a black object, which he thought was a weapon but which turned out to be a mobile phone.