Tanzania's first female president Samia Suluhu Hassan on Friday called for unity after she was sworn in following the sudden death of her predecessor, John Magufuli, from an illness shrouded in mystery.

Hassan, 61, a soft-spoken ruling party stalwart from the island of Zanzibar, will finish Magufuli's second five-year term, set to run until 2025.

Wearing a bright red headscarf, Hassan, who is Muslim, was sworn in at a ceremony in Dar es Salaam, where neither she nor the majority of attendees wore a mask, in the Covid-sceptic nation.

Tanzania's new president Samia Hassan Suluhu is pictured in 2019 with her late predecessor John Magufuli
Tanzania's new president Samia Hassan Suluhu is pictured in 2019 with her late predecessor John Magufuli AFP / Ericky BONIPHACE

"I can assure Tanzanians that there is nothing that will go wrong during this time. We will start where Magufuli ended," she said in a brief speech after she took the oath of office, inspected a special guard and received a 21-gun salute.

"Let us all be patient and unite as we move forward."

She becomes the only other current serving female head of state in Africa alongside Ethiopia's Sahle-Work Zewde, whose role is mainly ceremonial, whereas the president in Tanzania is also head of government.

Female presidents in Africa
Female presidents in Africa AFP / Gal ROMA

"The times to view women as weak are long gone, we are able and more than capable," said grocery store owner Ufo Tarimo, after the ceremony, highlighting the importance of "empowering women".

Hassan was little known outside Tanzania until she appeared on state television on Wednesday night to announce that Magufuli, absent from public view for three weeks, had died from a heart condition.

But questions have been raised over the true cause of the 61-year-old's death, after rumours that the famously Covid-sceptic leader had sought treatment abroad for coronavirus.

Tanzania is observing a 14-day mourning period
Tanzania is observing a 14-day mourning period AFP / Vincent LEFAI

Main opposition leader Tundu Lissu insists his sources said Magufuli had Covid-19 and had actually died a week ago.

Kenya's Daily Nation newspaper, which last week reported an "African leader", in clear reference to Magufuli, was in a Nairobi hospital, on Friday gave more details of his illness, also indicating Magufuli had in fact died last week.

The paper, which did not detail its sources, said Magufuli was discharged from Nairobi Hospital on life support after it was determined he could not be resuscitated, and returned to Dar es Salaam, where he died last Thursday.

Tanzania is observing a 14-day mourning period
Tanzania is observing a 14-day mourning period AFP / Vincent LEFAI

The paper said Magufuli had initially been evacuated to Nairobi on March 8 in a medical plane suffering from "acute cardiac and respiratory illnesses."

Hassan announced Magufuli would be buried next Thursday in his home town of Chato in northwest Tanzania.

Citizens have been invited to pay their respects at events in other cities from Saturday. Former presidents have typically been displayed in an open casket, but it is unclear whether this will be the case for Magufuli.

Tanzania's President John Magufuli dies, with a mixed legacy
Tanzania's President John Magufuli dies, with a mixed legacy AFPTV / STRINGER

Magufuli had declared prayer had rid the country of Covid-19, refused face masks or lockdown measures, stopped the publication of case statistics and championed alternative medicine, decrying the vaccines as "dangerous".

But by February, as cases soared and the vice president of semi-autonomous Zanzibar was revealed to have died from Covid-19, Magufuli conceded the virus was still circulating.

While Hassan says she will take over where Magufuli left off, hopes are high she will usher in a change in leadership style from her predecessor, nicknamed the "Bulldozer", and all eyes will be on her handling of the pandemic.

Magufuli leaves behind a complex legacy, his popular no-nonsense attitude and anti-graft stance marred by a swing to authoritarianism in which he cracked down on the media, activists and free speech.

The opposition and rights groups have urged Hassan to change course.

"As we continue mourning, let us use this period to open up a new chapter for rebuilding national unity and respect to freedom, justice, rule of law, democracy and people-centred development," said Freeman Mbowe, head of opposition group Chadema, in a statement Thursday.

He urged Hassan to "lead the nation toward reconciliation."

Human Rights Watch (HRW) said the new government "has a chance for a fresh start by ending problematic past practices."

But analysts say Hassan will face early pressure from Magufuli allies in the party who dominate intelligence and other key positions, and will try to shape her decisions and agenda.

"For those who were kind of expecting a breakaway from the Magufuli way of things I would say, 'hold your breath at the moment'," said Thabit Jacob, a Tanzania expert at Denmark's Roskilde University.

She was named Magufuli's running mate in the 2015 presidential campaign and the pair were re-elected in October last year in a disputed poll marred by allegations of irregularities.