GHAYDAH, Yemen—To win over locals in this relatively peaceful corner of a shattered country, Saudi Arabia has funded schools, expanded medical facilities and promised new boats for fishermen.

The kingdom’s military has also taken over sea and airports and brought in hundreds of Saudi soldiers to carry out the projects, stirring up opposition among residents of Yemen’s Al-Mahra province, whose capital is Ghaydah.

As...