After Mahmud II became sultan, Turkish border wars with the Russians continued. In 1810, the Russians surrounded the Silistre fortress for the second time. When Emperor Napoleon I of France declared war on Russia in 1811, Russian repression on the Ottoman border diminished, a relief to Mahmud. By this time, Napoleon was about to embark on his invasion of Russia. He also invited the Ottomans to join his march on Russia. However, Napoleon, who had invaded all of Europe except the United Kingdom and the Ottoman Empire, could not be trusted and accepted as an ally; Mahmud rejected the offer. The Bucharest Agreement was reached with the Russians on 28 May 1812. According to the Treaty of Bucharest (1812), the Ottoman Empire ceded the eastern half of Moldavia to Russia (which renamed the territory as Bessarabia), although it had committed to protecting that region. Russia became a new power in the lower Danube area, and had an economically, diplomatically, and militarily profitable frontier. In Transcaucasia, Turkey regained nearly all it had lost in the east: Poti, Anapa and Akhalkalali. Russia retained Sukhum-Kale on the Abkhazian coast. In return, the Sultan accepted the Russian annexation of the Kingdom of Imereti, in 1810. The treaty was approved by Emperor Alexander I of Russia on June 11, some 13 days before Napoleon's invasion began. The Russian commanders were able to get many of their soldiers in the Balkans back to the western areas of the empire before the expected attack of Napoleon.