EDMONTON -- A court erupted with angry screams and shouts from spectators on Friday as the Crown dropped murder charges against a youth who confessed during a police sting to killing two people.

Jeers and taunts were thrown at the 17-year-old, who was accused of second-degree murder. But the prosecution conceded it didn't have a case after the judge ruled the undercover evidence inadmissible.

Several sheriffs needed to be brought in to calm the crowd.

The youth made the confession in a "Mr. Big" sting, believing they were part of a criminal gang. But the boy recanted during his trial, saying he was just trying to fit in and gain respect.

Court of Queen's Bench Justice Brian Burrows had said earlier Friday that police took a troubled teen, who was a ward of the state, and offered him privileges such as hockey tickets, rock concerts and access to a condo.

Burrows said he was satisfied that the boy "was coerced by expectations and hopes of future significant benefits and advantages."

The judge, who was hearing the case without a jury, also said the statements the teenager made to police varied and contradicted the evidence.

Burrows expressed concerned about using such a sting at all on a teenager.

"In my view, permitting the use of statements ... made to Mr. Big would give rise to a real and serious possibility of abuse of conduct by the state."

The day before Boenke and Trudel were killed, the accused and another boy -- both 14 at the time -- had run away from the Strathcona County Ranch, a youth treatment facility run by Bosco Homes. The boys had been sent to the home for allegedly vandalizing a school.

The two were arrested after they were found driving Boenke's stolen truck. The accused confessed to police, but during pretrial hearings a judge ruled the statement inadmissible. Without that key piece of evidence, the Crown stayed murder charges.

There was no forensic evidence linking the boys to the killings. Their DNA was not found at the scene and there was no blood or gunshot residue on their clothes. The gun that killed Boenke and Trudel has not been recovered.

RCMP later targeted both boys separately in undercover stings. Last May, the Crown reactivated the case against the teen now before the judge and charged him with two counts of second-degree murder.

The suspect was being tried as a youth and cannot be identified.

His lawyer had argued that Mounties wasted time and money targeting a vulnerable youth in a poorly planned sting when they should have been looking for the real killer.

Mona Duckett said RCMP made a quick arrest and, when the case fell apart against the teen and a co-accused, officers forged ahead with an undercover charade that took advantage of the youth's vulnerabilities.

The Crown responded by saying police didn't coerce or intimidate the boy into a confession.

Prosecutor William Wister told court that social services miserably failed the accused teen as he was growing up, but Wister added that the child-welfare system was not on trial.

He said the teen might have low intelligence, but was able to do math in his head, carried on conversations with undercover police and always had a choice to leave, Wister said.