An Edmonton man admitted in court Friday he shot his 20-year-old friend to death.

Collin James Courteoreille, 21, pleaded guilty to criminal negligence causing death and possession of a loaded prohibited weapon without a licence in connection with the Aug. 25, 2014, death of Sylvin St. Pierre.

According to an agreed statement of facts, St. Pierre had been hanging out with several friends at a south-side apartment where one of them lived with her mother.

Courteoreille showed up carrying a handgun which he cleaned with a bandana. Holding the gun, he then walked into a bedroom where St. Pierre and a friend were playing a video game.

Court heard Courteoreille stated that the gun was loaded and he pointed it at St. Pierre's face from close range.

St. Pierre told him to "get that gun out of my face" and waved his hand to get it away. Courteoreille laughed and joked with St. Pierre about the gun, then again pointed it at his face.

St. Pierre again pushed it away with his hand. Courteoreille once again pointed it at his face.

As St. Pierre once more tried to push the gun away, it discharged. A bullet went into his head above his right eyebrow.

Court heard Courteoreille immediately began crying and apologizing, saying "it was an accident. I didn't mean to do it. I just shot my friend."

The others in the suite rushed into the bedroom. Courteoreille was told to leave and 911 was called.

An unconscious St. Pierre was taken to hospital. He he was declared brain-dead the next day and his organs were donated.

Witnesses interviewed by police lied, saying the shooter was unknown to them. They also lied when describing him.

The next day, the witnesses went to the hospital and told St. Pierre's parents that the shooting happened while he had been cleaning the gun.

Police were informed and they interviewed the witnesses again.

At that point, police learned the truth and a warrant was issued for Courteoreille's arrest.

After the guilty pleas were accepted Friday, victim impact statements were read out by St. Pierre's parents and grandmother, causing many there to weep.

His mother spoke of the terrible time the family had at the hospital and told Courteoreille that she prays such a "devastating ordeal" never happens to him.

St. Pierre's father said his life has been "shaken to the core" and spoke about the horrible effect on the family. "There is no word to describe losing a child."

Courteoreille, who had been out on bail, agreed to surrender himself into custody until sentencing June 1. A Gladue report was also ordered to look into his aboriginal background. Such reports can help a judge determine the length of a sentence.