The Open Door Policy under President McKinley and Secretary of State John Hay guided U.S. policy towards China, as they sought to keep open trade equal trade opportunities in China for all countries. Roosevelt mediated the peace that ended the Russo-Japanese War and reached the Gentlemen's Agreement of 1907 limiting Japanese immigration. Roosevelt and Taft sought to mediate and arbitrate other disputes, and in 1906 Roosevelt helped resolve the First Moroccan Crisis by attending the Algeciras Conference. The Mexican Revolution broke out in 1910, and the handling of unrest at the border would test the Taft administration before escalating under Wilson.