German Chancellor Angela Merkel said she was optimistic that a dispute over how to distribute asylum seekers in the EU would soon be resolved after a court ruled on Wednesday that member states must take in a share of refugees who reach Europe.

Speaking to the Frankfurter Allgemeine Sonntagszeitung (F.A.S.) newspaper two weeks before a national election in which she is expected to win a fourth term, Merkel said she welcomed the court’s decision.

Separately, the newspaper also reported that in negotiations between member states about redistribution, a compromise was starting to emerge which would link accepting refugees to payments that would come from the EU.

“The vast majority of EU states had not filed a complaint about redistribution and do not take the view that they never want to take in a refugee so I think there’s an opportunity to achieve a distribution of refugees that shows solidarity in the not too distant future,” Merkel said in the F.A.S. interview.

In its ruling, the EU’s highest court dismissed complaints by Slovakia and Hungary over the mandatory quotas introduced in 2015 to relocate asylum seekers from Greece and Italy.

Immigration has been a key issue during campaigning for Germany’s Sept. 24 election.

In the interview, Merkel said it was important to show solidarity in dealing with the migration crisis because otherwise there would be no solidarity on other issues in the EU and “that would be bitter for the cohesion of Europe.”

The newspaper reported that in negotiations between member states about redistribution, a compromise was starting to emerge which would link accepting refugees to payments that would come from the EU.

Citing sources involved in the negotiations, F.A.S. said EU member states had developed ideas such as solving the dispute by creating an incentive system in which the EU would give countries 60,000 euros for each refugee they take in.

If an EU member state undercuts its quota by more than half, the 60,000 euros per person should be withdrawn, it said.

As the distribution mechanism would be for a maximum of 200,000 refugees per year, it would cost up to 12 billion euros, the newspaper said.

It would also be possible to put border guards or national asylum officers in overburdened states so they take in fewer migrants, the newspaper said.

Interior Minister Thomas de Maiziere had told a Saturday newspaper that social benefits for asylum seekers in Germany were “quite high” and needed be harmonized across Europe.