A shallow 6.0 magnitude earthquake struck southeast of the Tanzanian financial centre of Dar es Salaam late Wednesday, the US Geological Survey (USGS) said.
The offshore quake struck at a depth of 15.5 kilometres (9.6 miles) just after 8 pm (1700 GMT) local time. The epicentre was 66 kilometres southeast of Vikindu, USGS said.Vikindu is just outside Dar es Salaam.
There were no immediate reports of damage, but the tremor was felt as far away as Nairobi in neighbouring Kenya.
Deep quakes tend to cause less shaking than shallower ones, which have far more potential for destruction.
Quakes are rare in East Africa.