BERLIN (Reuters) - German Chancellor Angela Merkel’s conservatives and their left-leaning Social Democrat (SPD) coalition partners agreed on Thursday to tighten asylum rules, reaching a compromise on how to stem an influx of migrants that topped one million last year.

Migrants wait on the bridge at the Austrian-German border between Braunau and Simbach at lake Inn near Passau, Germany, October 27, 2015. REUTERS/Michaela Rehle

The new measures include a two-year ban on family reunions for asylum seekers who are granted limited refugee protection and speeding up the deportations of failed applicants, said Economy Minister Sigmar Gabriel, announcing the deal.

A dispute over tighter immigration rules has been straining the ruling coalition, which includes Merkel’s Christian Democrats (CDU) and their Bavaria-based Christian Social Union (CSU) sister party, as well Gabriel’s SPD.

All three parties are eager to show voters that, despite deep divisions, the government is in control of the refugee crisis before three state votes in March and a general election next year.

“The mood is good,” Gabriel told reporters, signaling unity among the three parties after weeks of tension over CSU leader Horst Seehofer’s threat to take Merkel’s government to court if his demand to stem the flow of asylum seekers is not met.

The new rules, which have been in the works since November and entail a program for integrating refugees, also include speeding up the process for applicants from so-called safe countries and reducing financial support for asylum seekers.

Merkel, whose popularity has slumped over her handling of the crisis, is also holding a meeting with the heads of Germany’s 16 states who are demanding more government funds for German courses, schools, kindergartens and policing.

German towns and cities say the influx of 1.1 million asylum seekers last year is pushing their resources to the limit and they would not be able to accommodate more newcomers if the numbers do not go down.

The number of asylum seekers crossing the German border from Austria every day fell to some 700 over the last several days from more than 2,000 earlier in the year. German officials say the decrease is linked to winter and warn of a spike in spring.

This is the second bundle of asylum measures agreed by the government, which pushed a first package of tighter immigration rules in October.

Gabriel said that while tightening the rules to discourage migrants from reaching Germany illegally, the government wanted to bring Syrian refugees from camps in Lebanon and Jordan.

The government also wants to designate Morocco, Tunisia and Algeria as safe countries to facilitate the deportation of applicants from those countries. Morocco announced on Thursday that it had agreed to repatriate illegal migrants from Germany.