Millions more refugees could head for Europe if Britain and other NATO nations pull their troops out of Afghanistan too soon and the country collapses into disorder, the defence secretary has warned.
Sir Michael Fallon told an audience at the Munich Security Conference that if Afghanistan's fragile democracy failed "we here will feel the consequences, very directly".
"If it was right to go in, it has to be not right to leave before the job is done."
His comments came during a discussion about whether NATO's 15-year mission in the war-torn nation had been a success or a failure.
Sir Michael said:
"If this country collapsed we here will feel the consequences, very directly. There could be three, four million young Afghan men sent out by their villages to migrate westwards."
"And they are heading here, they are heading for Germany or Britain.
"That could be the consequence if this entire country collapses."
In total 456 British forces personnel or MoD civilians were killed while serving in Afghanistan.
Troops lowered the flag at Camp Bastion in October 2015, ending combat operations in the country after 13 years, though some remain in training and support roles.
During the Munich event, Sir Michael was flanked by his French, Dutch, Canadian and Turkish counterparts, as well as retired US admiral Jim Stavridis, the former NATO supreme allied commander Europe.
As well as a risk of a migrant influx Sir Michael warned there was still a risk from "transnational terrorist groups", adding:
"That is why we went in in the first place - those transnational terrorist groups are still there and they still pose a threat."
He also said NATO should also act to protect its values, saying: "This is a democracy that we helped to establish.
"Seven million people voted in elections for a new future for Afghanistan, voted to choose a government, however fragile it is at the moment.
"That government has asked for our help and my view is we should stay with it until, as long as we can, until that job is done."
Giving evidence to the Commons Defence Committee, Mr Penning described the security situation in the war-torn country as "difficult", and joked he was "probably going to get shot" for revealing more personnel may be sent there.
He told MPs:
"We have no plans to draw-down, actually there is a possibility that we might uplift because of what we are being asked to do."
"I have not been formally asked, but I might as well be honest with the committee, that's a possibility."