BERLIN (Reuters) - Germany will on Wednesday carry out its first group deportation of Afghans whose asylum applications have been rejected, in line with an agreement with Kabul, the news magazine Der Spiegel said on Tuesday, citing government sources.

More than a million migrants from the Middle East, Africa and elsewhere have arrived in Germany this year and last, prompting concerns about security and integration and boosting support for anti-immigrant groups such as the Alternative for Germany (AfD) party.

In 2016, Afghans are the second biggest group of asylum seekers in Germany after Syrians, according to data from the Federal Office for Migration and Refugees (BAMF).

A spokeswoman for the Interior Ministry did not confirm the exact date but said there would be a repatriation flight to Afghanistan by the end of the year, although details would not be announced in advance to avoid jeopardizing it.

She said the deportations were taking place on the basis of an agreement made with the Afghan government in October.

Der Spiegel said on its website that the Afghans would be flown from Frankfurt to Kabul and then ultimately sent back to their home regions as long as these were reasonably safe. It said the next plane had already been chartered for the beginning of January.

Germany has seen protests against the planned deportations in recent weeks; critics say much of Afghanistan is not safe and that returnees might face reprisals.

Last week, Chancellor Angela Merkel’s Christian Democrats (CDU) toughened their tone on migrants, and Deputy Finance Minister Jens Spahn said the legal barriers to deportation must be lowered.