Tanzania's President John Magufuli has died aged 61, the country's vice-president has announced.
He died on Wednesday from heart complications at a hospital in Dar es Salaam, Samia Suluhu Hassan said in an address on state television.
Mr Magufuli had not been seen in public for more than two weeks, and rumours had been circulating about his health.
Opposition politicians said last week that he had contracted Covid-19, but this has not been confirmed.
Mr Magufuli was one of Africa's most prominent coronavirus sceptics, and called for prayers and herbal-infused steam therapy to counter the virus.
"It is with deep regret that I inform you that today... we lost our brave leader, the president of the Republic of Tanzania, John Pombe Magufuli," Vice-President Hassan said in the announcement.
She said there would be 14 days of national mourning and flags would fly at half mast.
According to Tanzania's constitution, Ms Hassan will be sworn in as the new president within 24 hours and should serve the remainder of Mr Magufuli's five-year term which he began last year.
Mr Magufuli was last seen in public on 27 February, but Prime Minister Kassim Majaliwa insisted last week that the president was "healthy and working hard".
He blamed the rumours of the president's ill-health on "hateful" Tanzanians living abroad.
But opposition leader Tundu Lissu told the BBC that his sources had told him Mr Magufuli was being treated in hospital for coronavirus in Kenya.
John Magufuli at a glance
- Born in Chato, north-west Tanzania, in 1959
- Studied chemistry and maths at the University of Dar es Salaam
- Worked as a chemistry and maths teacher
- First elected as an MP in 1995
- Became a cabinet minister in 2000
- First elected president in 2015
When Covid-19 arrived in Tanzania, Mr Magufuli called on people to go to churches and mosques to pray. "Coronavirus, which is a devil, cannot survive in the body of Christ... It will burn instantly," he said.
He declared Tanzania "Covid-19 free" last June, saying the virus had been eradicated by three days of national prayer.
He also mocked the efficacy of masks, expressed doubts about testing, and teased neighbouring countries which imposed health measures to curb the virus.
"Countries in Africa will be coming here to buy food in the years to come… they will be suffering because of shutting down their economy," he said, according to the Associated Press.
Tanzania has not published details of its coronavirus cases since May, and the government has refused to purchase vaccines.
On Monday, police said they had arrested four people on suspicion of spreading rumours on social media that the president was ill.
"To spread rumours that he's sick smacks of hate," Mr Majaliwa said at the time.
Shock and disbelief in Tanzania
Analysis by Athuman Mtulya, BBC News, Dar es Salaam
The country is in a sombre mood - for the first time in its six decades of existence, Tanzania has lost a sitting president, John Pombe Magufuli.
The news of his death was received with shock and disbelief - although there were rumours of his illness, the authorities reassured the country that all was well with him.
From his home district of Chato to the capital of Dodoma to the business hub of Dar es Salaam, most Tanzanians have been mourning Magufuli.
There are those with a different view, especially on social media led by exiled opposition politician Tundu Lissu, who has been speculating that President Magufuli had contracted Covid which led to his death, however the authorities have insisted the death was caused by heart complications.
Tanzanians are now turning their minds to the succession, which should see current Vice-President Samia Suluhu Hassan become the country's first female president.
Mr Magufuli was declared president on his 56th birthday in October 2015. He was elected for a second term following a disputed poll last year.
He was hailed for his anti-corruption stance during his time in office, but he was also accused of cracking down on dissent and curtailing certain freedoms.
His critics agree that Mr Magufuli contributed to Tanzania's development. He invested in large infrastructure projects such as a standard-gauge railway to connect the country with its neighbours, major highways, and a bus system in the commercial hub of Dar es Salaam.
He also increased electricity production, reducing the need for power rationing.
But it is his approach to Covid-19 that many analysts say will define his legacy.
African leaders pay tribute
In Tanzania, people have reacted with grief and disbelief to the news of Mr Magufuli's death.
One, Joseph Petro, told the BBC he thought Mr Magufuli was a "caring" leader, adding "he was helping people in one way or another".
"I am really pained. I am personally pained," he said.
Another, Illuminata Abel, offered similar sentiments: "He was not my relative, but he was someone who listened to people's problems, and he was down to earth."
African leaders have also come out to pay tribute.
Kenya's President Uhuru Kenyatta said: "I have lost a friend, colleague and visionary ally," and declared a seven-day period of national mourning in Kenya.
Former Nigerian President Goodluck Jonathan called Mr Magufuli a "partner in democracy" and a "patriot who loved his country".
But Tanzanian opposition leader Tundu Lissu told the BBC that Mr Magufuli's "politics, policies and Covid denialism" had "driven the country towards disaster".