Britain’s national security adviser and the country’s most senior civil servant announced his resignation on Sunday. Sir Mark Sedwill, who is also the Cabinet secretary, confirmed his decision in a letter to UK Prime Minister Boris Johnson. Mr Sedwill's role as national security adviser will be taken by the government’s chief Brexit adviser, David Frost. Mr Sedwill's other roles are expected to be assigned to other people, the BBC reported. “Over the last few years I have had direct experience of the outstanding service that you have given to the government and to the country as a whole," Mr Johnson said. “It has been by any standards a massive contribution – but as prime minister I have particularly appreciated your calm and shrewd advice.” Mr Sedwill is among several senior civil servants to resign or announce their intention to leave their posts in the six months since December’s general election and Mr Johnson’s convincing win. Mr Johnson's senior political adviser, Dominic Cummings, has long been critical of the country's civil service, saying government is not nimble enough to deliver change. Mr Cummings faced calls for his own resignation after he travelled hundreds of kilometres, from London to Durham, during lockdown but survived with Mr Johnson’s support. Mr Sedwill, as Cabinet secretary, advised Mr Johnson on policy. He is a career diplomat who spent 20 years at the Foreign Office and was the UK's ambassador to Afghanistan. The Cabinet Office confirmed Mr Johnson asked him to lead a new G7 panel on Global Economic Security, as the UK assumes its presidency. In his letter to Mr Johnson, Mr Sedwill referred to crises that dominated his time as Cabinet secretary.<br/> "Two years ago, you asked me to continue to support you through Brexit and the election period," he wrote. "It was obviously right to stay on for the acute phase of the Covid-19 crisis. “As you are setting out this week, the government’s focus is now shifting to domestic and global recovery and renewal. "I am fortunate to have served in some of the most challenging and rewarding jobs in national and international public service under seven prime ministers and in extraordinary times.” Mr Johnson replied: “You have also spoken with a unique authority – unusual in a Cabinet secretary – on international affairs and national security, and as national security adviser you have done much to keep this country safe. “It is therefore great news that you have agreed to continue to serve this country on the international stage, beginning with the UK’s preparations for the G7 summit next year. "You have done it all in Whitehall: from Afghanistan to the modernisation of the civil service; from immigration policy to Brexit and defeating coronavirus.<br/> "After serving for decades with great distinction, and unflappable good humour, I believe you have earned the gratitude of the nation."