In 1893, he was named general-in-chief of the Army of Africa in the First Melillan campaign, and agreed to a peace treaty (Peace of Melilla) with the Sultan of Morocco in 1894. In 1893, he survived an assassination attempt.