One reason it has been so difficult to agree on a common policy is money: it costs a lot for countries like Greece and Italy to build up a fully functioning system to receive asylum-seekers.
EU commissioner Cecilia Malmström believes the new agreement improves the situation for asylum-seekers in Europe in many ways.
"It's legally secure, it's transparent and it's predictable for asylum-seekers," she says. "It imposes extremely clear requirements, regarding what member countries must do and must not do, and it entails a higher level of protection for the most vulnerable, for example children, refugees who are fleeing torture, women who are vulnerable to sexual violence, and so on."
Last year, 332,000 people sought asylum in the EU, that is, 10 percent more than the year before. Five countries in total, including Sweden, received 70 percent of the asylum seekers. The other 22 EU countries combined, received the other 30 percent.
Malmström says she hopes the new rules will even out this distribution.
On Wednesday, EU ambassadors in Brussels confirmed the agreement on the final bits of the asylum policy, and the EU Parliament is expected to give its formal approval.