After militias loyal to Madero defeated the Mexican federal army, on May 21, 1911, Madero signed the Treaty of Ciudad Juárez with Díaz