SYDNEY, N.S. - Cpl. Matthew Wilcox held his dying friend in his arms and apologized as Cpl. Kevin Megeney slumped to the floor of their shared tent in Afghanistan, bleeding from a gunshot wound to the chest, a witness told Wilcox's court martial Friday.

Wilcox, a 23-year-old reservist from Glace Bay, N.S., has pleaded not guilty to manslaughter, criminal negligence causing death and negligently performing his military duty in death of Megeney, a 25-year-old reservist from Stellarton, N.S.

The prosecution team, which opened its case Thursday, is trying to prove Wilcox killed Megeney through careless use of a 9-millimetre Browning handgun. But they must first prove that he fired the shot that killed his close friend.

The military court has heard from two witnesses who said the two soldiers were apparently playing a game of quick-draw when Wilcox's gun went off.

On Friday, one of the first people to enter the tent after the shot rang out, Master Cpl. Matthew McKay, described in detail what he saw on the evening of March 6, 2007.

His testimony represents the first eyewitness account relayed in open court.

As well, McKay's recollection of Wilcox's apology is important because the prosecution contends it represents an admission that he fired the gun.

McKay, a slight man with a close crewcut, told the four-member military panel that he was off duty at Kandahar Airfield when he and some comrades heard a gunshot nearby.

"It sounded like a 9-millimetre," he told the court martial, being held in a makeshift courtroom at the garrison in Sydney, N.S. "We had a general idea of where it came from."

At first, he said he thought it was a accidental discharge, but then he heard someone scream: "Oh God! Someone help."

McKay, who now works as a bodyguard with high-ranking officials in Kabul, said he was the second person into the tent as he and others rushed in to see what had happened.

"There was still smoke in the air," he recalled. "You could smell it."

He said he saw Wilcox propping up Megeney on his right side, the wounded man bracing himself with an outstretched arm.

At that point, McKay ran out of tent, grabbed a first aid kit from a tactical vest and returned to help his comrade.

"I was just trying to talk to him, best I could," he testified.

"But he couldn't talk."

McKay was asked if Wilcox said anything.

"Corporal Wilcox said, 'C'mon Kev. C'mon Kev. I'm sorry," McKay testified.

McKay said Megeney stopped breathing and another soldier tried to revive him by using mouth-to-mouth resuscitation.

He said he could see blood bubbles coming out of what they thought was the entry wound -- a small hole above Megeney's right nipple.

Another soldier, who identified himself as a "combat lifesaver," entered the tent and took over, checking Megeney's vital signs.

"He just said, `He's got to get to a hospital now or he's not going to make it," said McKay.

They called for a stretcher and lifted Megeney.

"That's when we saw blood on the floor, where he was laying," said McKay.

He said they then ran 200 metres to a nearby medical facility.

McKay said he left Megeney at that point and went back to the tents, where he said he saw Wilcox talking to the section commander.

He was asked to describe Wilcox's demeanour.

"He seemed shocked or overwhelmed by what was happening," McKay said.

At the front of the courtroom, which is usually a military bar, McKay's dramatic account appeared to take its toll on Megeney's parents, Dexter and Karen.

Dexter Megeney usually sits ramrod straight in his chair during the proceedings, but as the graphic details emerged, he leaned forward, put his hands on his knees and stared at the floor. His wife sat motionless, her hand on his leg.

Master Cpl. Kyle Keigan, the first witness at the military trial, said Wilcox told him what happened over drinks in Sydney several months after the shooting.

Keigan testified that Wilcox revealed that the two off-duty soldiers began to play a game of quick-draw in the tent when the weapon went off, but that he didn't know it was loaded.

Fetterly has said the evidence will show Wilcox had loaded the weapon with a magazine and the pistol's safety catch was not engaged when the weapon went off "while playing a game in a tent."

The military prosecutor said all soldiers within the sprawling NATO base are required to unload their weapons into ammunition barrels once they are off duty and inside their tents.

The court has heard this was a mandatory practise, even though soldiers in Wilcox's platoon carried special, UN-issued cards that said they were exempt from the rule.

Fetterly also noted that while soldiers are required to carry an unloaded firearm when they are off duty, the weapon's magazine -- the container that holds the bullets -- must be removed, rendering it incapable of firing.