BERLIN (Reuters) - The number of people of working age in Germany will fall by around a third by 2050 if Europe's biggest economy does not increase immigration from countries outside the European Union, a study published on Friday said.

Germany will need between 276,000 and 491,000 net immigrants from non-EU countries each year to safeguard its levels of prosperity and economic activity, said the study by the Bertelsmann foundation.

It predicted the working-age population would drop to under 29 million from about 45 million today if immigration didn't pick up. Raising the retirement age to 70 and increasing the number of women in the workforce would only add around 4.4 million to the number of employed, the study added.

According to latest statistics, the number of foreigners living in Germany grew by 519,340, or 6.8 percent, in 2014 against the previous year -- many of them Syrians fleeing war and Romanians and Bulgarians seeking work.

Almost 60 percent of the new immigrants came from EU member states. 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.

But as the whole of Europe grapples with shrinking birth rates and aging populations, the study's authors expect the pool of qualified workers to dwindle.

As a consequence, Germany should focus on attracting talent from beyond Europe's borders, it said.

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.

(Reporting by Gernot Heller; Writing by Caroline Copley; Editing by Michael Nienaber and Crispian Balmer)