Britain must work with the Taliban to avoid the humanitarian crisis unfolding in Afghanistan ending in social and economic meltdown, David Miliband has told the Guardian, as he called for the imminent evacuation of Nato troops not to be followed by a diplomatic abdication by the west. UK and US forces are airlifting the final civilians before their respective militaries pull out by 31 August, with fears growing that further terror attacks could be launched as the window for desperate people seeking refugee status continues to shrink. Miliband, who is president of the International Rescue Committee (IRC) and a former Labour foreign secretary, said an “invisible crisis” was brewing for the more than 20 million Afghans who are dependent on humanitarian aid for survival, with Covid and a nationwide drought compounding the situation of those who do not manage to make it out of the country in the next four days. He said a longstanding “gridlock in global politics” was partly to blame for the situation and warned that neighbouring countries, including Pakistan, “can’t afford the west to turn away”. He urged the UK and US to be part of a “full and balanced” engagement led by the United Nations with the incoming Afghan government – alongside China and Russia. “When it comes to engagement with the new authorities in Kabul, my approach to this is you need to do diplomacy with everyone,” Miliband said. “Every actor has something that they want – and so that creates space. But that space only becomes a proper landing zone if there is international unity and engagement … The western engagement needs to be built on unity amongst the west, but also engagement with Russia and China, because a united international response is far more likely to lead to effective engagement than one that’s fragmented.” Miliband was restrained in his criticism of the G7 for failing to pay enough attention to Afghanistan when leaders of the world’s biggest democratic economies gathered in Cornwall two months ago, hosted by the prime minister, Boris Johnson. However, he said: “June was a time when Afghanistan should have been on the agenda … I think that the absence of a recognition of an increasingly boiling pot in Afghanistan really is a blot, to put it mildly.” As attention turns to the fate of the thousands of Afghans not expected to make it out before the final RAF flight departs, Miliband voiced fears that “a military withdrawal is going to be followed by a humanitarian, political and diplomatic international withdrawal”. The IRC has 1,700 local staff who will continue to need support to deliver aid, he added, saying they “don’t just depend on us, but believe that their communities depend on us as well”. After some hoping to flee Afghanistan by land were trapped by the sealing of borders with Iran, Miliband warned against “trying to create a kind of incredibly poor, even poorer version of North Korea”, and said: “It’s in no one’s interest that it becomes even more unstable.” There will be many people unable to leave by 31 August, Miliband continued. He said the UK and other Nato countries should continue to uphold the promises of resettlement they have made, even when their militaries pull out. “It’s very important that … there’s no statute of limitations on the debt that you owe to someone who you promised that you’ll keep them safe,” Miliband said. “I think that’s very, very important.” Keen not to enter the political debate sparked by Tony Blair, who warned that the withdrawal of troops was based on an “imbecilic” slogan of ending “forever wars”, Miliband did praise the former prime minister he served under as an “extraordinarily clear thinker and devastating phrase-maker”. “The dividing line between domestic policy and foreign politics is much more blurred than ever,” said Miliband. “There’s hardly an issue that has no international dimension … I think for the UK, this is quite a perilous time in our international relations. Many people are very hacked off about the extent to which transatlantic partnership is working.” Miliband did not rule out a return to domestic politics after his work with the IRC, saying: “I don’t know what I’m going to do next”. But he added: “I always make the choice to try and dedicate my professional life to advancing the things I believe in, consistent with the responsibilities I have to my family.”