Within hours of Britain’s vote to leave the European Union, it started.

A Lithuanian lawmaker wrote to the chief executive of HSBC, trying to court the bank. A website promoting Frankfurt as an attractive location to invest went live. A Berlin start-up published an online how-to guide for anyone looking to move to the German capital.

Britons had only just begun to digest the results of their referendum when cities and companies across Europe leapt into action, all of them jockeying to lure businesses, entrepreneurs and investment from London, the region’s economic behemoth.

Much remains up in the air, as the country embarks on a yearslong process to leave the 28-nation bloc. Britain hasn’t even officially filed for divorce, and there will be painful negotiations on matters including trade and whether people from European Union nations will have the freedom to work in Britain, as they do now.

Despite the high levels of uncertainty, others in Europe are, in effect, looking to gain from Britain’s pain.