Hundreds of migrants hoping to reach Germany and other European countries flooded inside Budapest's main train station after a two-day stand off with security forces, as Hungary's prime minister was due in Brussels for talks on the migrant crisis that is straining EU relations.

Scores waded inside on 3 September as police withdrew, although the railway operator said no trains were scheduled to leave from there to Western Europe. Pictures from the scene showed dozens of asylum seekers storming trains waiting on the tracks.

More than 2,000 had been waiting outside the main Keleti station in the capital since police closed the doors to them earlier in the week, after thousands got aboard carriages to Munich or Austria. The situation was causing some tensions as migrants staged demonstrations against being held there, while activists from the far-right Jobbik party also took to the steets.

Meanwhile, Hungarian prime minister Viktor Orban, who arrived in Brussels to address the crisis, vowed to deploy the military to crackdown on illegal immigration.

He also blamed Germany for the high number of asyilum-seekers reaching his country. "[The] problem is not a European problem, the problem is a German problem, nobody would like to stay in Hungary."

Earlier, Germany, France and Italy called for fairer distribution of migrants across the 28-nation bloc, through an overhaul of existing regulations in an open letter signed by their foreign ministers. It read: "Europe must protect refugees in need of protection in a humane way – regardless of which EU country they arrive in."

The so-called Dublin regulation currently says refugees have to apply for asylum in the first EU country they reach. If they travel to a second EU nation, they can be forcibly sent back to the country of entry.

The system's viability has been brought into question by events such as those unfolding in Budapest, where thousands of migrants go to reach a destination of their choice. It is also accused of putting an unfair burden on countries on the outer borders of the union, such as Italy and Greece, which have long complained about being overwhelmed by asylum seekers reaching their shores.

More about the EU migrant crisis