Millions of tourists and business people visiting Europe will have to complete a €5 ($5.35) online security check before arrival if an EU plan to tighten controls on foreigners who do not need visas wins approval.

The system, put forward by the executive European Commission on Wednesday, would check identity documents and residence details against a variety of EU security and crime databases.

Following Islamic State attacks in France and Belgium and the chaotic mass arrival of migrants and refugees in Greece, the executive hopes screening can close loopholes at its borders for violent militants, criminals and would-be illegal immigrants.