Canadian opposition leader Jack Layton has died after a second bout of cancer, aged 61.
Layton passed away at his home in Toronto early on Monday surrounded by his wife and children, his family said in a statement.
His left-leaning New Democratic Party (NDP) surged to become the official opposition for the first time in May's federal elections.
He stepped down only last month as party leader to fight his illness.
In a letter released by the NDP after his death was announced, Mr Layton said he remained optimistic about Canada's future and its political system.
'Cherish every moment'
"Unfortunately my treatment has not worked out as I hoped," he said. "So I am giving this letter to my partner Olivia to share with you in the circumstance in which I cannot continue."
Layton urged readers to "to cherish every moment with those you love at every stage of your journey, as I have done this summer".
He described Canada as "a great country, one of the hopes of the world".
"We can be a better one," he added, "a country of greater equality, justice, and opportunity."
Layton called on members of his party to remain committed to their "proud history of social justice", universal healthcare and public pensions.
To young Canadians, he spoke of his "belief in your power to change this country and this world".
Prime Minister Stephen Harper saluted his late adversary's "contribution to public life, a contribution that will be sorely missed".
At Parliament Hill in Ottawa, the Canadian capital, the flag was lowered to half-mast on Monday.
Layton announced he had been diagnosed with prostate cancer in February 2010.
He campaigned in spring this year, leaning on a cane after surgery for a broken hip, leading his party to a second-place finish in May's federal elections.
On 25 July, the former Toronto city councillor said he was quitting temporarily as NDP leader to fight a newly diagnosed "non-prostate cancer".
He was elected in 2003 as leader of the left-leaning New Democrats, long the third-place federal party in the Canadian parliament.
Before that, the Quebec native was an activist and community organiser in Toronto, campaigning on issues such as Aids, poverty, violence against women and homelessness.
He was elected MP in 2004 from a constituency in Toronto.
His popularity helped the NDP to overtake the Liberals in May's elections and become the country's official opposition party, when it took 103 seats, up from 37.
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.
Layton is to be buried in a state funeral on Saturday, the NDP said. The ceremony, which was offered by Mr Harper, will be open to the public.