KAMPALA, Uganda—Days of riots over the construction of a 310-mile Chinese-funded natural-gas pipeline in Tanzania have left seven people dead, but the development will continue, officials said Monday.

The riots mark an escalation of local tensions as the East African nation attempts to start exploiting recently discovered offshore natural-gas reserves.

The...