FILE PHOTO: People walk in front of an office building of the Federal Office for Migration and Refugees (BAMF) in Berlin, Germany, October 15, 2017. REUTERS/Fabrizio Bensch/File Photo

BERLIN (Reuters) - Germany expects to spend around 78 billion euros on migration-related issues through 2022, including 31 billion euros to combat the root causes driving people to leave their homes and head to Europe, Der Spiegel magazine reported on Saturday.

The magazine cited a document drafted by the German Finance Ministry which estimates federal spending of around 70 billion euros through 2022, plus an additional eight billion euros that the federal government agreed to transfer to states and local communities to cover their costs through 2021.

Social payments to migrants in Germany are projected to account for about 21 billion euros through 2022, with another 13 billion to be spent on language courses and other integrative measures, the magazine cited the document as saying.

Processing, registration and accommodations for refugees would cost 5.2 billion, according to the estimate.

German is working to integrate over a million migrants who entered the country in 2015 and 2016 after a key decision by German Chancellor Angela Merkel that has hit her popularity.

A public backlash against the decision helped catapult the far-right, eurosceptic Alternative for Germany (AfD) party into the lower house of parliament in the September national elections.