Jack Layton guided his New Democratic Party to its best election performance in the federal elections [Reuters]

Jack Layton, the leader of Canada's official opposition, has died after a second bout of cancer just months after guiding his New Democratic Party (NDP) to its strongest performance in the May federal election.

Layton, 61, had almost single-handedly turned his leftist party into the second largest in the House of Commons.

"He passed away peacefully at his home surrounded by family and loved ones," a statement from his family said.

Layton had stepped down in July as party leader to fight his illness, passing on the baton to Nycole Turmel, who is serving as interim leader.

In a letter released by the NDP after his death was announced, Mr Layton said he had every reason to be optimistic, determined, and focused on the future."

He described Canada as "a great country, one of the hopes of the world."

Layton called on members of his party to remain committed to their "proud history of social justice, universal healthcare and public pensions."

The former municipal politician from Toronto had won admiration for his bravado and stamina on the campaign trail, pumping a walking cane in the air soon after a hip operation and treatment for prostate cancer.

Rather than his illness making him look weak, pollsters said it gave Layton a warmer image than his political rivals, boosting his party's popularity even as Stephen Harper's ruling Conservatives were returned to office with a majority.

The Canadian Prime Minister Stephen Harper gave a personal tribute to his opposition number, "on behalf of all Canadians, I salute Jack's contribution to public life, a  contribution that will be sorely missed."

"I know one thing, Jack gave his fight against cancer everything he had. Indeed, Jack never backed down from any fight," said Harper.

Layton was elected in 2003 as leader of the left-leaning New Democrats, who constantly were the third party in the Canadian parliament.

The 2011 federal election campaign looked like a straight battle between the Conservatives under Harper and the Liberals' Michael Ignatieff.

But Layton's party scored its historic win by garnering 103 seats, up from a previous 37.

Layton had nudged the party toward the centre, by promising to balance the budget in four years by boosting corporate taxes and raising other revenues to offset tens of billions in new spending.

He is survived by his Hong Kong-born wife Olivia Chow, also an NDP MP, and his two children from a previous marriage, Michael and Sarah.

Source: Agencies