CAMP LEATHERNECK Afghanistan (Reuters) - British troops ended their combat operations in Afghanistan on Sunday as they and U.S. Marines handed over two huge adjacent bases to the Afghan military, 13 years after a U.S.-led invasion launched the long and costly war against the Taliban.

Their coming departure leaves Afghanistan and its newly installed president, Ashraf Ghani, to deal almost unaided with an emboldened Taliban insurgency after the last foreign combat troops withdraw by year-end.

At the U.S. Camp Leatherneck and Britain’s Camp Bastion, which lie next to each other in the southwestern province of Helmand, troops lowered the American and British flags for the final time on Sunday and folded them away.

The timing of their withdrawal has not been announced for security reasons.

Camp Leatherneck, the largest U.S. base to be handed over to Afghan control, and Camp Bastion together formed the international coalition’s regional headquarters for the southwest of Afghanistan, housing up to 40,000 military personnel and civilian contractors.

But on Sunday, the base resembled a dust-swept ghost town of concrete blast walls, empty barracks and razor wire. Offices and bulletin boards, which once showed photo tributes to dead American and British soldiers, had been stripped.

“It’s eerily empty,” said Lt. Will Davis, of the Queen’s Dragoon Guards in the British Army. Camp Bastion was also where Prince Harry was based in 2012 as an Apache helicopter gunner.

In all, 2,210 American soldiers and 453 British soldiers have been killed in Afghanistan since 2001, when the U.S.-led coalition toppled the Taliban government for harboring al Qaeda after the militant group carried out the Sept. 11, 2001, attacks on the United States.

The coalition has been led by NATO since 2003, and includes forces from Germany, Italy, Jordan and Turkey.

Slideshow ( 13 images )

After Sunday’s ceremony, the Afghan National Army’s 215th Corps will be headquartered at the 28 sq km (11 sq mile) base, leaving almost no foreign military presence in Helmand.

The U.S. military is leaving behind about $230 million worth of property and equipment –- including a major airstrip at the base, plus roads and buildings -- for the Afghan military.

“We gave them the maps to the place. We gave them the keys,” said Col. Doug Patterson, a Marine brigade commander in charge of logistics.

Speaking on BBC television, British Defense Minister Michael Fallon said British armed forces had helped to strengthen the Afghan security forces, who were now taking on “full responsibilities”.

“It is with pride that we announce the end of UK combat operations in Helmand, having given Afghanistan the best possible chance of a stable future,” he said.

“CAUTIOUSLY OPTIMISTIC”

Helmand province, which produces 80-90 percent of the opium that helps finance the Taliban’s insurgency, has seen fierce fighting this year, with Taliban and allied forces seeking to seize the district of Sangin from the Afghan army and police.

The battles have raised concerns about whether Afghan forces are truly able to hold off the Taliban without intelligence and air support from the United States and its allies.

Slideshow ( 13 images )

Officials with the U.S.-led coalition say the Afghan forces, which have been losing hundreds of soldiers and policemen each month in battles, assassinations and suicide attacks by insurgents, did not lose any significant ground in the recent summer fighting season.

“I’m cautiously optimistic they will be able to sustain themselves,” said Brig. Gen Daniel Yoo, the commander of Regional Command (Southwest).

He said the success of the Afghan security forces depended on leadership, continued development of logistics and confidence.

“They’ve got to want it more than we do,” he said.

International forces in Afghanistan boosted their numbers to about 140,000 in 2010 troops with the aim of wresting control of Helmand back from the Taliban. By Jan. 1, that number will be about 12,500, comprising mostly trainers and advisers.

Of those, 9,800 will be American, with the rest from other NATO members. The British will keep a small contingent at an officer training school in Kabul.

Gen. John Campbell, head of coalition forces in Afghanistan, acknowledged Helmand “has been a very, very tough area” over the last several months.

“But we feel very confident with the Afghan security forces as they continue to grow in their capacity,” he said.

He said that the smaller international force that will remain next year will still provide some intelligence and air support, two areas where Afghan forces are weak.

General Sher Mohammad Karimi, chief of staff of the Afghan National Army, also said the insurgency “will keep us busy for a while”.

“We have to do more until we are fully successful and satisfied with the situations,” he said.

Civilian casualties in Afghanistan may reach an all-time high this year, with the United Nations reporting nearly 5,000 killed or wounded in the first half of 2014, most of them by the insurgency.

Several Afghans at Sunday’s ceremony expressed pride at taking over the base, mixed with sadness that the international forces with whom they have worked with for years are leaving for good.

“We are going to miss our friends,” said Afghan Brig. Gen. Nasim Sangin. “But we will still be in touch by email.”