HALIFAX - A former Canadian soldier charged in the shooting death of a fellow reservist in Afghanistan told his court martial Wednesday he fired his weapon instinctively when he saw a gun pointed at his head.

However, Matthew Wilcox admitted the only other person inside the tent that day at Kandahar Airfield had to be his best friend, Cpl. Kevin Megeney -- the man he is accused of fatally shooting.

Wilcox, who is facing a second court martial in the case, also denied telling anyone that the two infantrymen from Nova Scotia were playing a game of "quick draw" when his gun went off on March 6, 2007.

Testifying in his own defence, the 26-year-old from Glace Bay told the military court he knowingly failed to remove a loaded magazine from his 9-mm Browning pistol before entering the tent he shared with Megeney, who was from Stellarton.

Wilcox said he left the magazine in the semi-automatic weapon because he was too busy carrying his gear after completing a long shift guarding the camp's main gate.

Under cross-examination, Wilcox admitted he could have removed the magazine several times before entering the tent, but he chose to leave it in -- a violation of an order that stated Canadian military personnel could not carry loaded weapons inside the base.

Wilcox testified he and Megeney were dropping off gear inside the tent when he heard the sound of a pistol being readied for firing from Megeney's bunk area.

"I heard the slide of a pistol being loaded and out of the corner of my eye I could see a pistol," he told the court. "As I was turning, I fell backwards, pulled my pistol, cocked it and fired."

The former corporal with the 2nd Battalion, Nova Scotia Highlanders said his reaction time was little more than one second.

"Everything happened so quickly, I didn't have a thought," he said, adding that he immediately dropped the gun and ran to help his friend as he slumped to the ground, a bullet wound in his chest.

Megeney, 25, died a short time later in a nearby military hospital tent.

When defence lawyer David Bright asked his client if he had told other soldiers that he and Megeney were playing a game of "quick draw" when the gun went off, Wilcox denied saying that to anyone. However, Wilcox confirmed he told one friend that he had heard rumours to that effect.

When Bright asked him how he felt after the shooting, Wilcox replied in a monotone.

"Horrible, sir," he said. "Kev was a really good guy. I can't really explain how I feel, sir."

Maj. Anthony Tamburro, one of the prosecutors in the case, pressed Wilcox to explain why he didn't take an extra moment to assess the threat he faced, knowing the only other person nearby in the tent was Megeney.

"You really didn't believe there was a member of the Taliban in your tent, did you?" the military lawyer asked.

"No, sir," Wilcox replied, adding that he never looked at the person he was shooting at and did not take deliberate aim.

"Logically, you knew that the person standing in that corner was Cpl. Megeney." Tamburro asked.

But Wilcox rejected that argument, saying he didn't have time to think. "It just happened so fast. I didn't have those thoughts."

Still, Wilcox agreed when Tamburro suggested the soldier had a moment of clarity when he realized he could defend himself with a weapon that would normally be unloaded.

"I suppose so," Wilcox said.

As well, Wilcox agreed when Tamburro suggested the sharp, metallic clicking sound of a pistol being cocked was common inside the soldiers' tents, and it was possible Megeney was only cleaning his weapon at the time.

Wilcox has pleaded not guilty to criminal negligence causing death and negligent performance of a military duty.

He was sentenced to four years in prison and ejected from the military after he was found guilty of the two offences following a court martial in 2009.

That verdict was set aside last year and a new trial ordered after Wilcox's lawyers argued the makeup of the military jury was unfair. The panel had four members instead of the usual five because one was excused due to a conflict with work.

The second court martial started in April.

During his testimony Wednesday, Wilcox offered short, direct answers to all questions in a manner consistent with military training.

Dressed in an off-white shirt and striped tie, Wilcox still looks like a soldier. His hair is close-cropped and he stood at attention every time the military judge entered and left the small courtroom.

Final submissions are scheduled for Friday.