GULU, Uganda—A prominent red sign welcoming visitors to this remote and dusty agricultural city makes the announcement in capital letters: “This is now a 4G zone.”

That is thanks in part to Facebook Inc., which, along with Indian telecom giant Bharti Airtel Ltd.’s Ugandan unit and Mauritius-based Bandwidth & Cloud Services Group, laid nearly 500 miles of fiber-optic cable across the isolated northwest of this East African nation. The project, begun in early 2017 and completed at the end of last year, has expanded the...