BERLIN (Reuters) - The number of foreigners living in Germany grew at the fastest rate in more than two decades last year, the Statistics office said on Monday, data that is likely to fuel an already heated debate on immigration.

Figures showed an increase of 519,340 people, or 6.8 percent, from a year earlier, many of them Syrians fleeing war and Romanians and Bulgarians seeking work -- marking a second year in a row of record immigration in Europe's largest economy.

Concerns about immigration has increased support for right-wing parties, including the new Alternative for Germany (AfD), and grassroots movements such as PEGIDA (Patriotic Europeans Against the Islamisation of the West), which held large rallies in the eastern city of Dresden late last year.

"So far there have only been two years where the number of foreigners in Germany saw a stronger rise than in 2014 -- namely in 1992, by 613,500, and in 1991, by 539,800," the Statistics Office said. Germany took in people fleeing ethnic violence in the former Yugoslavia in the early 1990s.

The total number of foreigners registered by the end of 2014 was 8.2 million, the highest since records began in 1967, in a country of just over 80 million people whose population and workforce is aging and shrinking more than any major economy save Japan.

Polls show most Germans think Chancellor Angela Merkel's government is paying too little attention to worries about incomers.

But organizations and politicians have also been coming out to defend Germany's record on immigration. Many of PEGIDA's rallies outside Dresden were dwarfed by gatherings of tens of thousands insisting that Germany welcomes immigrants.

Germany saw record immigration levels in 2013, confirming its status as the second-top global destination for emigrants after the United States.

Almost 60 percent of the newly-registered immigrants came from EU member states. The number of Romanians increased by 87,945, or 32.9 percent, and the number of Bulgarians by 36,435, or 24.8 percent, after their populations gained the right to work across the European Union.

Romania overtook Poland as the biggest single source of new immigrants but Syria was a close third, with a 107.7 percent rise in the number of people seeking refuge in Germany. The number of new Syrian immigrants in 2014 was 61,295.

(Reporting by Stephen Brown and Rene Wagner; Editing by Andrew Heavens)