Boris Johnson and other G7 leaders have failed to persuade the US to keep troops in Afghanistan to continue evacuation efforts past the end of the month.
The Prime Minister was expected to press US President Joe Biden to keep his forces on the ground beyond August 31, as they are providing security at Kabul airport to allow people to flee the country.
But following an emergency meeting of G7 leaders, chaired by the PM on Tuesday afternoon, Biden said the deadline remained in place.
And Johnson said: “We will go right up until the last minute that we can but you’ve heard what the President of the United States has said, you’ve heard what the Taliban have said.”
He added: “We’re confident we can get thousands more out, but the situation at the airport is not getting any better.”
He said leaders had agreed the “number one condition” up to and after August 31 was that the Taliban must grant “safe passage for those who want to come out”.
Johnson said there were “harrowing scenes” at Kabul airport for those attempting to flee Afghanistan.
And he said G7 leaders – who were joined in Tuesday’s meeting by the secretaries general of the United Nations and Nato – had agreed on a “road map” for engaging with the Taliban.
He said: “What we have done today at the G7 is we have got together the leading Western powers and agreed not just a joint approach to dealing with the evacuation, but also a road map for the way in which we’re going to engage with the Taliban, as it probably will be a Taliban government in Kabul.
“The number one condition we’re setting as G7 is that they have got to guarantee, right the way through, through August 31 and beyond, safe passage for those who want to come out.
“Some will say that they don’t accept that and some, I hope, will see the sense of that, because the G7 has very considerable leverage – economic, diplomatic and political.”
The SNP said the failure to extend the deadline was “deeply regrettable” and called for Parliament to be brought back from its summer break to monitor the situation.
SNP Westminster leader Ian Blackford said: “The UK Parliament must be recalled immediately so that UK Government ministers can provide daily updates and MPs can properly scrutinise plans for the evacuation, refugee resettlement, and efforts to tackle humanitarian and security concerns.
“It would be unacceptable for the Prime Minister to avoid scrutiny by keeping Parliament in recess for another fortnight.”
In a joint statement after the meeting the leaders of the G7 countries – Canada, France, Germany, Italy, Japan, the UK and the US – said that the legitimacy of any future government in Afghanistan depends on the approach the Taliban takes to uphold international obligations and ensure a stable Afghanistan.
Johnson said 9000 people had been evacuated from Kabul so far by the UK across 57 flights.
He said: “I am totally realistic about the Taliban and I don’t think that anybody is going to pretend that this is anything other than a very difficult situation.
“But that doesn’t mean that we should ignore the leverage that we have.
“We want to help with the humanitarian crisis, the difficulties that people in Afghanistan, people fleeing Afghanistan, are going to experience.
“But when it comes to engaging with the Taliban, and engaging with the government in Afghanistan, whatever its exact composition, the G7 has huge leverage.”
The Taliban earlier said it would not accept foreign troops remaining in Afghanistan past the end of the month.
During a press conference in Kabul, spokesman Zabihullah Mujahid said: “August 31 is the time given and after that it’s something that is against the agreement.
“All people should be removed prior to that date.
“After that we do not allow them, it will not be allowed in our country, we will take a different stance.”
The Taliban, which swept to power last week in the wake of America’s major withdrawal of troops, has suggested that foreign forces remaining past the deadline would cross a “red line” that will “provoke a reaction”.
The group warned on Tuesday that evacuations “will not be allowed” after August 31.
And a spokesman said the Afghans should “return to their homes and resume their calm everyday lives”.
Mujahid said crowding at the airport was dangerous and “people could lose their lives”.
And he urged the US not to “encourage” highly skilled people to leave Afghanistan.