NEW YORK — Omar Khadr has agreed to plead guilty to all war crimes charges he faces — including murder — and is ready to serve a total of eight years in prison, seven of them in Canada, Postmedia News has learned.

Khadr, 24, had previously said he would never stand up in court and admit to having thrown the grenade that fatally wounded Sgt. 1st Class Chris Speer, a U.S. special forces soldier, during a 2002 firefight in Afghanistan.

Among the four other charges to which Khadr is admitting are attempted murder and conspiracy, according to the deal between prosecutors and his defence.

These relate to accusations he helped make and plant roadside bombs targeting U.S. and allied forces in Afghanistan.

The U.S. State Department is expected to present the deal to the Canadian government, which was not involved in the talks, according to sources.

The talks had involved discussion around a sentence of varying lengths — some a "couple" more years than the combined eight currently on the table, sources say.

Under the terms of the deal, Khadr would serve the first year of his sentence at the U.S. naval base in Guantanamo Bay, Cuba — where he has been detained since his transfer there in October 2002 following his capture three months earlier during the firefight that led to Speer's death.

It is also believed that Khadr, who was 15 when captured, has agreed not to profit from the crimes he is set to admit — meaning he would not be able to launch legal action against the U.S. government.

The trial of the Canadian-born terror suspect had been set to resume Monday in Guantanamo — but the military commission prosecuting him will now meet there Oct. 25 for an expected sentencing hearing.

Though prosecutors long ago ruled out seeking the death penalty had they prevailed against Khadr in court, he faced a maximum sentence of life behind bars if convicted of the charges against him.

Still, the Canadian part of the deal cannot be put into effect unless there is agreement, either politically or through conformity with Canadian law, over Khadr's custodial repatriation.

Canada and the United States are parties to a prisoner transfer treaty, but Prime Minister Stephen Harper's government has long refused to seek Khadr's repatriation under any terms, maintaining he faces serious charges in the United States.

The office of Foreign Affairs Minister Lawrence Cannon maintained that position Thursday, saying there was "no . . . agreement," and that the charges against Khadr would "have to be addressed in the U.S."

Under the prisoner exchange treaty, the government can refuse to accept a detainee considered to be a security threat to Canada.

Insiders reveal that the broad outlines of the deal have already been approved by the Guantanamo "convening authority" — a position, currently filled by Ret. Vice-Admiral Bruce MacDonald, whose role is to serve as the commissions "gatekeeper."

But given Canada's reaction to the deal remained uncertain, there was no public confirmation it had been struck.