A sailor told a jury how new year celebrations aboard a Royal Navy frigate ended with him being shot by a fellow guard.
Marine mechanic Christopher Newton was struck in the chest by a bullet.
One of his lungs had to be removed by surgeons in an emergency operation, Portsmouth Crown Court was told.
Leading seaman Richard Slater, 27, pleaded not guilty to inflicting grievous bodily harm on Newton on board HMS Scylla.
The prosecution said before going on duty, Slater and others on watch had been allowed drinks to celebrate the new year.
Slater and Able Seaman Jason Marsh posed for a photograph with their pistols drawn.
A shot rang out and Mr Newton fell to the deck with a bullet in his chest.
He told the court Slater had been stripping his pistol and reassembling it.
He said: ‘I told him he had shot me and he said he couldn’t have.’