Rosebery became a leader of the Liberal Imperialist faction of the Liberal Party, and in Gladstone's third (1886) and fourth (1892–1894) administrations, Rosebery served as Foreign Secretary. When Gladstone retired in 1894, Rosebery became his successor as Prime Minister, much to the disgust of the more left-wing Liberals. Rosebery's government was largely unsuccessful—his designs in foreign policy, such as expansion of the fleet, were defeated by disagreements within the Liberal Party, while the Tory-dominated House of Lords stopped the whole of the Liberals' domestic legislation. In 1895, Rosebery resigned, and a Conservative government under Lord Salisbury took his place.