Tanzania vice-president, Samia Suluhu Hassan revealed that the President, John Magufuli had died of heart complications.
Hassan said that Magufuli was hospitalised on March 6 at the Jakaya Kikwete Cardiac Institute and died at Mzena State Hospital in Dar es Salaam.
She also announced that the country would get into a 14-day period of mourning as arrangements for the burial are made.
During this period, all flags in Tanzania will fly at half-mast, Hassan announced.
Magufuli, who has in the past year proclaimed there was no Covid in Tanzania, had been rumoured to have been struck by the virus and flown to Nairobi on March 8 via an Amref Flying Doctors service.
Magufuli, 61, had last been seen in public on February 24 during a tour of the commercial hub, Dar es Salaam, where he inspected projects and addressed public gatherings.
Magufuli was born on October 29, 1959 in Chato, north-western Tanzania and has been in office since 2015 as the fifth president.
Magufuli was serving his second term that was to run until 2025 after controversially winning the Presidential election in 2020.