Zimbabwe opposition leader Morgan Tsvangirai has died aged 65 after a battle with cancer, party officials have said.

Elias Mudzuri, a vice president of the Movement for Democratic Change party, reported Tsvangirai's death in a post on Twitter on Wednesday.

"It is sad for me to announce that we have lost our icon and fighter for democracy," Mudzuri wrote.

Tsvangirai had been in and out of hospital in South Africa after revealing in 2016 that he had colon cancer.

Read more about Tsvangirai here, and watch a 2009 interview with him here.

He served as prime minister under ex-President Robert Mugabe in a 2009-2013 unity government.

Obert Gutu, a party spokesman, confirmed Tsvangirai's death on Twitter, calling him "a political icon, a humble and tenacious fighter for the creation of a peaceful, stable, democratic and progressive nation-state in Zimbabwe".

Last week, Tsvangirai had taken to Twitter to play down speculation that his illness was terminal.

"I have cancer and [am] not feeling too well, but I am stable and the process is under control. ... I am recovering," he wrote on February 6.

Al Jazeera's Haru Mutasa, reporting from Harare, said that people in Zimbabwe's capital were "shocked" at the news of his death.

"A lot of people are saying they are going to miss him," she said.

Who was Morgan Tsvangirai?

A powerful public speaker, Tsvangirai was born in 1952 to a bricklayer father in Buhera, in the southeast of Zimbabwe.

At independence from Britain in 1980, Tsvangirai became branch chairman of the National Mine Workers Union, rising through the ranks to become secretary-general of the Zimbabwe Congress of Trade Unions (ZCTU) in 1988, a post he relinquished when he formed the Movement for Democratic Change (MDC) in 1999.

In the 2008 elections, he was the main challenger to Mugabe and his ZANU-PF. He managed to win 47 percent of the vote, against Mugabe's 43 percent, but fell short of the threshold needed to avoid a second round.

Tsvangirai then boycotted the runoff, citing intimidation and harassment of his supporters, handing Mugabe the victory.

Regional leaders and the international community intervened, and after months of negotiations, Tsvangirai was sworn in as prime minister in 2009. It was a temporary power-sharing government but Mugabe was still the president.

In the 2013 presidential elections, Tsvangirai's MDC lost by a huge margin. His critics said he had ignored the plight of the poor and got caught up in the trappings of wealth and power.

=Tsvangirai's death comes a few months before Zimbabweans are expected to head to the polls to elect a new president following the resignation of Mugabe, who has been succeeded by Emmerson Mnangagwa.

Lance Guma, editor of Nehanda Radio, said Tsvangirai's death dealt "a severe blow to the opposition".

"Finding someone new and trying to build their profile within the country within a space of four months is going to be a mammoth task," he said.

Alex Magaisa, a former adviser of Tsvangirai, called the late opposition leader a "brave and courageous man".

"In 2008, he did something very incredible," Magaisa said from Canterbury, in the UK.

"He won the election, he was the most popular politician at the time. He could have been stubborn, but he decided to do what was necessary for the people of Zimbabwe. He compromised and worked with Mugabe."