Europe will be "overwhelmed" by a wave of migration if Britain and its European neighbours fail to support Africa and the Middle East through intervention, William Hague has warned.

The former foreign secretary said a surge in population in the region, alongside poor governance, low economic growth and divisions along religious lines, could fuel large-scale instability.

He cautioned that, while past military involvement in Iraq and Libya are widely seen as failures of Western intervention, the war in Syria showed that standing by can also be disastrous.

Lord Hague made the comments as British troops prepare to travel to Libya to train local armed forces for a new government set up with the help of British diplomats.

Writing in The Telegraph, he said the combination of instability and booming population across the region could render Western involvement "unavoidable".

He said: "If European countries, including Britain, think they can get by without intervention in that region over the next few decades, they face being overwhelmed by a movement of humanity that they have never before contemplated or experienced.

"Intervention - to try to prevent conflict, end wars, stabilise governments and create economic improvements - will be a completely unavoidable necessity for many Western nations."

Lord Hague said Britain will have to overcome a collective feeling that getting involved abroad is a "mistake" and instead look at how to "intervene well".

Citing the overthrow of Colonel Muammar Gaddafi in Libya in 2011, he said intervention had probably shortened the war and reduced civilian deaths.

"Such situations often need a more forceful, insistent and long-term foreign presence to make them into a success," he wrote.

US President Barack Obama was seen as criticising Britain's involvement in the wake of Gaddafi's downfall when he said Prime Minister David Cameron had appeared "distracted" in dealing with the fallout.

Lord Hague said the problem came from trying to install a new government in place of revolutionary forces too quickly. As a result the new system collapsed as groups jostled for power.

He said: "A free country and democracy can take decades to build. The West will need strategic patience to assist that, rather than dropping each problem country as quickly as possible or pronouncing it a failure."

Going back to Libya for a second attempt at stability was "vital" he said, adding: "Turning our backs and thinking it's hopeless would produce the greatest calamities of all."