A record number of Brits have chosen to become German citizens in the wake of Brexit.

Germany's statistics office said Tuesday that the number of Brits who took German citizenship spiked by 361% in 2016 to 2,865.

"There appears to be a link with Brexit," the agency said in a statement.

Foreigners are eligible to be naturalized in Germany after living in the country for at least eight years. They must also have adequate knowledge of German and pay an application fee.

The trend is not limited to Germany. The number of Brits applying for foreign passports shot up after the country voted last June to leave the European Union.

When the U.K. leaves the EU -- probably in March 2019 -- its citizens are likely to lose the automatic right to live and work in the 27 remaining member countries. They could also face new restrictions on travel.

Italy, Sweden, Poland and Hungary all reported a surge in interest in the days immediately after the Brexit vote.

Ireland's foreign ministry reported in January that passport applications from the U.K. surged 41% in the wake of the referendum. Nearly 65,000 British applications were submitted in total.

Related: Applications for Irish passports surge 41%

The British passport has traditionally been considered one of the most powerful in the world, giving holders a huge amount of global mobility.

But it has lost some of its luster.

The U.K. also appears to be becoming a less attractive place for Europeans. Since the referendum, many have chosen to return home.

U.K. government data released in May show that 117,000 citizens of other EU countries left Britain in 2016, an increase of 36% over the previous year.

Net migration from the EU fell to 133,000 last year from 184,000 in 2015.

EU migrants are leaving because of uncertainty over their legal status, slower economic growth and higher prices.

Related: The U.K. economy is in trouble. Politics could make it worse

The slump in the value of the pound -- down 15% since the Brexit referendum -- and stagnating real wages have made salaries earned in the U.K. worth less when transferred abroad.

-- Claudia Otto contributed reporting.