Marburg virus has killed five people in Tanzania's north-western Kagera region, the health ministry has said.
High fever is a common symptom of the deadly Ebola-like virus, often followed by bleeding and organ failure.
Tanzania's Health Minister Ummy Mwalimu said the disease had been contained and she was confident it would not spread further.
Three people are being treated in hospital and authorities are tracing 161 contacts, Ms Mwalimu added.
Tanzania's strategy to control the spread was praised by the World Health Organization (WHO).
WHO's regional director for Africa, Dr Matshidiso Moeti, said: "The efforts by Tanzania's health authorities to establish the cause of the disease is a clear indication of the determination to effectively respond to the outbreak."
Dr Moeti said WHO is working with Tanzania's government to "rapidly scale up control measures to halt the spread of the virus".
The Marburg virus is a cousin of the equally deadly Ebola virus - part of the filovirus family - and it kills on average half of those infected, the WHO says.
It is a severe, often fatal illness with symptoms including headache, fever, muscle pains, vomiting blood and bleeding.
No vaccines or anti-viral treatments have been approved to treat the virus, the WHO has said, but it adds that rehydration with oral or intravenous fluids has improved survival.
Recent Marburg infections and fatalities have been centred on the African continent, where hundreds of people have died from the virus in the past.
The virus was first identified in 1967, after 31 people were infected and died simultaneously in Germany and Serbia.
Since then, there have been outbreaks in Guinea, Uganda, Angola, the Democratic Republic of Congo, Kenya and South Africa, the WHO reports.
Equatorial Guinea reported its first outbreak last month. According to the WHO and local authorities, at least nine people have died.
Last July, two people in Ghana died from the virus and 98 contacts were quarantined. Two months later, the country declared the end of its outbreak.
In 2021, Guinea health officials confirmed West Africa's first case of the virus, while an outbreak in Angola in 2005 killed more than 300 people.
The Egyptian rousette fruit bat often harbours the virus, but African green monkeys and pigs can also carry it.
Among humans, it spreads through bodily fluids and contact with contaminated bedding.
Additional reporting by Rhoda Odhiambo in Nairobi and Alfred Lasteck in Dar es Salaam