Hungary's prime minister is asking the European Union to pay for half of the cost of anti-migrant fences it built on its southern borders, some 440 million euros ($523 million).

In a letter dated Thursday to EU Commission President Jean-Claude Juncker, Prime Minister Viktor Orban said the fences erected in 2015 protect not just Hungary "but entire Europe against the flood of illegal migrants."

Orban said Europe needed to show solidarity with Hungary's border protection efforts, not just with Greece and Italy, the countries which have received the brunt of the migration influx.

EU leaders have criticized Hungary for failing to show solidarity because it refuses to take in any asylum-seekers sought to be relocated from Greece and Italy until their asylum requests are decided.