BackgroundDengue is a disease of public health interest, and Tanzania experienced major outbreaks in 2014 and 2019. Here, we report our findings on the molecular characterization of dengue viruses (DENV) that circulated during two smaller outbreaks (2017 and 2018) and one major epidemic (2019) in Tanzania.Methodology/Principal findingsWe tested archived serum samples from 1,381 suspected dengue fever patients, with a median age of 29 (IQR:22–40) years, referred to the National Public Health Laboratory for confirmation of DENV infection. DENV serotypes were identified by reverse transcription polymerase chain reaction (RT-PCR), and specific genotypes were identified by sequencing the envelope glycoprotein gene and phylogenetic inference methods. DENV was confirmed in 823 (59.6%) cases. More than half (54.7%) of patients with dengue fever infection were males, and nearly three-quarters (73%) of the infected individuals were living in Kinondoni district, Dar es Salaam. DENV-3 Genotype III caused the two smaller outbreaks in 2017 and 2018, while DENV-1 Genotype V caused the 2019 epidemic. DENV-1 Genotype I was also detected in one patient in 2019.Conclusion/SignificanceThis study has demonstrated the molecular diversity of dengue viruses circulating in Tanzania. We found that contemporary circulating serotypes did not cause the major epidemic of 2019 but rather due to a serotype shift from DENV-3 (2017/2018) to DENV-1 in 2019. Such a change increases the risk for patients previously infected with a particular serotype to develop severe symptoms upon potential re-infection with a heterologous serotype due to antibody-dependent enhancement of infection. Therefore, the circulation of serotypes emphasizes the need to strengthen the country’s dengue surveillance system for better management of patients, early detection of outbreaks, and vaccine development.