He felt the best course of action to keep internal problems to a minimum was to expand into Ethiopia and Egypt. The Khalifa invaded Ethiopia with 60,000 Ansar troops and sacked Gondar in 1887, destroying nearly every church in the city. He later refused to make peace. He successfully repulsed the Ethiopians at the Battle of Metemma on March 9, 1889, where the Ethiopian emperor Yohannes IV was killed. He created workshops to maintain steam boats on the Nile and to manufacture ammunition. But the Khailfa underestimated the strength of the Anglo-Egyptian forces and suffered a crushing defeat in Egypt.