BERLIN (Reuters) - Germany's federal government managed to post a budget surplus of 5 to 7 billion euros in 2016, coalition sources told Reuters on Wednesday, with the extra money already being slated for a fund to finance spending on a record influx of refugees.

Germany has welcomed more than 1 million asylum seekers since the beginning of 2015, many fleeing war zones in the Middle East. The government has created a fund to finance the costs of accommodating and integrating the new arrivals.

The Finance Ministry will publish the exact figure for the 2016 budget surplus soon, two coalition politicians familiar with the ministry's budget plans said.

In 2015, the federal government achieved a budget surplus of nearly 13 billion euros, helped by buoyant tax revenues and record-low borrowing costs. That extra money also went into the special fund created for refugee-related expenditure.

From that money, the Finance Ministry originally earmarked 6.1 billion euros for 2016 and 6.7 billion euros for 2017. But the government managed to finance its refugee-related spending last year without tapping the fund, the sources said.

This means that there are still nearly 13 billion euros available for refugee-related spending and the budget surplus from 2016 comes on top of this, the coalition sources said.

The windfall sparked a debate among Chancellor Angela Merkel's conservatives and the co-governing Social Democrats (SPD) about whether to tap the fund for other purposes.

Eckhardt Rehberg, budget expert for Merkel's conservatives, said the government should use some of the extra money to pay back old debt and reduce the overall debt burden.

"After having a budget without new debt, it would be another cornerstone of fiscal policy to pay off old debt," Rehberg said, adding the conservatives wanted to explore the possibility of changing the budget law for that purpose.

The co-governing Social Democrats (SPD) rejected the idea, saying the extra money should better be used to further increase public investment in education and infrastructure and to reduce taxes for workers on small and medium incomes.

"The fund is not the piggy bank of the finance minister," SPD lawmaker and budget expert Johannes Kahrs said.