There is a "real risk" Islamic State (IS) militants will launch attacks on Britain as they are forced out of their stronghold in Iraq, International Development minister Rory Stewart has said.
Mr Stewart said it is "overwhelmingly likely" Iraqi forces will win the battle of Mosul and seize back control of the territory from the jihadis.
And he sought to calm fears the push could result in an unmanageable humanitarian crisis as up to one million civilians are expected flee the city.
But he warned that as pressure ratchets up on IS, also known as Daesh, in Iraq, they may seek revenge by launching terror attacks in the UK and Europe.
He told BBC One's Sunday Politics: "This is a group that has proved over the last five years very unpredictable.
"It changes very quickly. Often it does unexpected things. For example, when in 2009 its predecessor had been largely wiped out in Iraq, it attached into Syria. When it was under pressure in Syria it came back into Iraq.
"In the past it didn't hold territory. Now it holds territory. It is clear that that's something that they are focused on.
"So we also have, along with all the stuff within the region, a big, big focus on counter-terrorism, security and making sure that we keep the United Kingdom and Europe safe."
His comments came as Iraqi and Kurdish forces continue their push against IS fighters in Mosul.
The fight to regain the city, IS's last stronghold in Iraq, has taken longer than some commentators expected it to last.
But Mr Stewart said victory is likely as 30,000 troops are taking on just a few thousand IS fighters in the city.
He said: "So I would say it is overwhelmingly likely that this battle for Mosul will be won by the Iraqi army."
It is estimated that up to one million people will flee the city, sparking fears the humanitarian crisis will overwhelm refugee camps set up in the region.
But Mr Stewart sought to calm these fears and said humanitarian and medical staff are in the area ready to provide support.
He said: "A lot of the investment has gone into creating a network of camps, these are refugee camps with tents and medical supplies and food, around the edge of Mosul."
He said that while Britain has put tens of millions of pounds into the UN relief effort there has been a "lag" in getting money from some other donors.
But he insisted "we do have the support structures in place for those refugees around".
His comments come as International Development Secretary Priti Patel announced Britain will donate £14 million to provide shelter, vital equipment and medical teams for up to 66,000 people displaced by the military offensive.
The money is part of the £40 million pledge made last month at the UN General Assembly.
Ms Patel said: "Liberating Mosul will be a great blow to Daesh's hold on northern Iraq.
"However, with up to one and a half million people still living in the city there is little doubt that we could soon see a mass movement of people out of the city. Their protection is a paramount concern.
"Preparing ahead of this crisis is vital. With our support, the residents of Mosul will get the shelter, supplies and medical care they need in the immediate aftermath of this crisis.
"The UK's goal is to support the Iraqi government to retake the city in a way that protects civilians, minimises the humanitarian impact and helps stabilise the country."