During a surprise visit to Kabul, Prime Minister David Cameron has promised that Britain will always be "a strong partner and a good friend" to the country.
Cameron was the first of world leaders to meet on October 3 with President Ashraf Ghani Ahmadzai, who was sworn into office this week following months of political turmoil.
Holding a joint press conference with Ghani, Cameron said Britain is committed to helping Afghans build a “more secure, stable, and prosperous” future.
He also called on the new Afghan national unity government to “bring the country together in a way that can deliver non-corrupt, good governance to the whole of Afghanistan."
Ghani took office on September 29 after coming to a power-sharing agreement with presidential rival Abdullah Abdullah, who was sworn in as chief executive with powers similar to that of prime minister.
Cameron lauded both men, saying they put national interests ahead of "personal power."
Ghani said the political unity that had been forged with the new government was "essential to solve the problems of Afghanistan."
He also paid tribute to all foreign soldiers who died in combat in Afghanistan, and said British troops had stood "shoulder to shoulder" with Afghanistan.
Upon arrival in Afghanistan, Cameron, who was to visit British troops in Helmand Province, paid tribute to the 453 British troops who have died while serving in Afghanistan, as well as those who have been injured.
Behind the United States, Britain has been the second-largest contributor to the international military coalition.
British combat troops are due to leave Afghanistan by the end of the year after a 13-year campaign.
Ghani’s administration signed this week a long-delayed security deal allowing nearly 10,000 U.S. troops to remain in Afghanistan after the international combat mission ends on December 31.
A similar agreement was signed with NATO, spelling out terms to allow up to 5,000 additional international troops -- mostly from Britain, Germany, Italy, and Turkey -- to stay in Afghanistan in a noncombat role after 2014.
Britain has also been one of the largest financial donors to the Afghan government.
Cameron pledged $287 million a year until 2017 "sustain the major progress" the country had made on education, health and other public services.
He also said he and Ghani would jointly host a conference on future aid to Afghanistan in London in November.
Earlier, Britain's prime minister visited a British air base in Cyprus from where jets are launching strikes against Islamic State militants in Iraq.
Speaking in Kabul, Cameron said, "The work of defeating Islamist extremist terror goes on elsewhere in the world."
"And because this threatens us at home, we must continue to play our part," he added.
With reporting by AP, the BBC, and AFP