Upon Derby's retirement in 1868, Disraeli became prime minister briefly before losing that year's general election. He returned to the Opposition, before leading the party to winning a majority in the 1874 general election. He maintained a close friendship with Queen Victoria, who in 1876 appointed him Earl of Beaconsfield. Disraeli's second term was dominated by the Eastern Question—the slow decay of the Ottoman Empire and the desire of other European powers, such as Russia, to gain at its expense. Disraeli arranged for the British to purchase a major interest in the Suez Canal Company in Egypt. In 1878, faced with Russian victories against the Ottomans, he worked at the Congress of Berlin to obtain peace in the Balkans at terms favourable to Britain and unfavourable to Russia, its longstanding enemy. This diplomatic victory over Russia established Disraeli as one of Europe's leading statesmen.