The Anglo-Russian Convention of 1907, or Convention between the United Kingdom and Russia relating to Persia, Afghanistan, and Tibet, was signed on August 31, 1907, in St. Petersburg, Russia. It ended the longstanding rivalry in Central Asia and enabled the two countries to outflank the Germans, who were threatening to connect Berlin to Baghdad with a new railroad that would probably align the Ottoman Empire with Germany. The Convention ended the long dispute over Persia. The United Kingdom promised to stay out of northern Persia, and Russia recognized southern Persia as part of the British sphere of influence. Russia also promised to stay out of Tibet and Afghanistan. In exchange, London extended loans and some political support. , The convention brought shaky British–Russian relations to the forefront by solidifying boundaries that identified respective control in Persia, Afghanistan and Tibet. It delineated spheres of influence in Persia, stipulated that neither country would interfere in Tibet's internal affairs and recognized Britain's influence over Afghanistan. The agreement led to the formation of the Triple Entente.