BERLIN (Reuters) - Nearly 55,000 migrants 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, the government said on Wednesday.

“That’s a considerable increase from last year,” Interior Ministry spokesman Harald Neymanns told a news conference, saying the 2016 figure had climbed to 54,123 through Dec. 27. “The increase is welcome. It’s always preferable when people leave the country voluntarily instead of being deported.”

A Finance Ministry spokesman said the government would boost funding slightly to 150 million euros in 2017 to support efforts to encourage people to leave Germany.

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 from the Middle East, Africa and elsewhere since early 2015.

Last week a failed asylum seeker who had sworn allegiance to the Islamic State militant group killed 12 people when he rammed a truck into a Christmas market in Berlin, fuelling growing 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 that is supposed to help support finding employment at home.

Separately, German security officials told Reuters 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 public support up 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 (AfD) 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.