As a minister under Gowon, Shagari also undertook a peace mission to mediate between Julius Nyerere of Tanzania and Idi Amin of Uganda in order to avert Uganda–Tanzania War by withdrawing their troops from the borders. After serving under Gen. Yakubu Gowon, he returned to Sokoto again to serve as the Chairman of Sokoto State Urban Development Authority (SUDA) during which he started building Sokoto Modern Market. In the wake of local government reforms under the Obasanjo led government. Shagari was elected as the counselor of Yabo Local Government in 1976.