In January 1887 Italian troops from Somalia fought a battle against Ras Alula Engida's militia in Dogali, Eritrea, where they lost 500 troops. The Prime Minister, Agostino Depretis, resigned because of this defeat in July 1887. Francesco Crispi replaced him as Prime Minister. On May 2, 1889, the Ethiopian Emperor Menelik II and Italy signed a peace treaty.