Numbers of voluntary deportations are on rise, but so are the numbers of refugees stopping at German borders.

Nearly 55,000 migrants and refugees who were not eligible for or were likely to be denied asylum left Germany voluntarily in 2016, up by 20,000 from the number who left of their own volition in 2015, according to government officials.

Germany has toughened its stance on immigration in recent months, prompted by concerns about security and integration after admitting more than 1.1 million migrants and refugees from the Middle East, Africa and elsewhere since early 2015.

“That’s a considerable increase from last year,” Harald Neymanns, interior ministry spokesman, announced on Wednesday, adding that the 2016 figure had climbed to 54,123 through December 27.

“The increase is welcome. It’s always preferable when people leave the country voluntarily instead of being deported.”

READ MORE: Mediterranean migrant deaths in 2016 pass 5,000

A finance ministry spokesman said the government would boost funding slightly to 150 million euros ($157m) in 2017 to support efforts to encourage people to leave Germany.

Last week a failed asylum seeker who had sworn allegiance to the Islamic State of Iraq and the Levant (ISIL) group killed 12 people when he drove a truck into a Christmas market in Berlin, prompting criticism of Chancellor Angela Merkel’s immigration policy.

Most of those leaving in 2016 returned to their homes in Albania, Serbia, Iraq, Kosovo, Afghanistan and Iran, Sueddeutsche Zeitung newspaper said earlier.

Those leaving are eligible for one-off support of up to 3,000 euros ($3,135) that is supposed to help support finding employment at home.

INTERACTIVE: The refugee crisis beyond Europe

Separately, German security officials told Reuters news agency the number of those deported after their asylum requests were rejected rose to almost 23,800 from January to November – up from almost 20,900 in all of 2015.

There has also been a rise in the number of refugees turned away at the borders.

A report by the Neue Osnabruecker Zeitung daily said police had turned back 19,720 refugees through the first 11 months of 2016 – up from 8,913 in all of 2015.

Most were from Afghanistan, Syria, Iraq and Nigeria. They had been registered in other EU countries.

As public support for her pro-refugee policies wanes ahead of September’s federal election, Merkel has said it is vital to focus resources on those fleeing war, and to keep up public support by deporting foreigners to countries where there is no persecution.

Attacks and security alerts involving refugees and migrants have boosted the popularity of the anti-immigration Alternative for Germany party, whose rise above 10 percent in opinion polls could complicate Merkel’s re-election hopes.

On Tuesday, seven refugees from Syria and Iraq aged 15 to 21 were detained in Berlin on charges of attempted murder for trying to set fire to a homeless man in an underground station.