Ethiopia’s government foiled a coup attempt that killed several senior government officials, including its military chief, underlining the deep challenges facing Prime Minister Abiy Ahmed as he launches a sweeping, but controversial, reform program.

Mr. Ahmed appeared on state television wearing army fatigues to confirm a coup attempt had been thwarted. The U.S. Embassy said on Saturday night that it was aware of reports of gunfire in Addis Ababa but on Sunday the capital seemed calm. The internet, switched off shortly after...