Images posted on social media showed significant damage to buildings in Bukoba, a city of more than 70,000 people where most casualties were reported.
Tremors were felt as far away as western Kenya.
"This incident has caused a lot of damage," Deodatus Kinawila, the district commissioner of Bukoba, told the BBC.
"For now, the situation is calm and under control," he said later.
"Some people have been discharged from hospital," he added. "We don`t expect many more injuries."
The US Geological Survey says the quake struck at a depth of 10km (six miles) at 15:27 local time on Saturday (12:27 GMT).
East Africa`s Great Rift Valley runs along a geological fault line but major earthquakes there are rare.
A magnitude six quake struck the Tanzanian town of Arusha, east of Bukoba, in July 2007.
More about: