REUTERS - The last U.S. Marines unit and final British combat troops in Afghanistan officially ended their operations on Sunday as they packed up to leave the country and transferred a massive military base to the Afghan military.

The American and British flags were lowered and folded up for the final time at the regional headquarters of the international military, 13 years after the toppling of the Taliban's radical Islamist regime launched America's longest war.

The timing of the troops' withdrawal from the base in the strategic province of Helmand was not released for security reasons.

Camp Leatherneck is the largest U.S. base to be handed over to Afghan control as the coalition ends its combat mission at the end of the year, leaving most of the fight against a resilient Taliban insurgency to Afghan army and police.

British forces transferred the adjacent Camp Bastion at the same time.

Once a teeming compound of some 40,000 personnel, the coalition's Regional Command (Southwest) combined base on Sunday resembled a dust-swept, well-fortified ghost town.

Concrete blast walls and razor wire were left guarding empty sand lots and barracks. Offices were bare, and bulletin boards stripped of photo tributes of fallen American troops.

"It's empty now - when I got here, it was still bustling, so there were a lot of services around and people around," said Marine Capt. Ryan Steenberge, whose taskforce was overseeing surveillance and security for the withdrawal and will be among the last troops out.

"It's weird to see different pieces pull away."

The most recent official estimate of combined international troops at the base was 4,500 - and those last few will be gone soon, officials said.

After the withdrawal, the Afghan National Army's 215th Corps will be headquartered at the 6,500-acre base, leaving almost no foreign military presence in Helmand.

The 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 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.

Officials with the U.S.-led coalition say the Afghan forces held their own this summer fighting season and did not lose any significant ground.

"I'm cautiously optimistic they will be able to sustain themselves," said Brig. Gen Daniel Yoo, the commander of Regional Command (Southwest), said of the Afghan forces.

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

"They've got to want it more than we do," he said of Afghan forces that have been losing hundreds of soldiers and policemen each month in battles, assassinations and suicide attacks by insurgents.

Helmand was a major focus of the 2010 troops surge to wrest control back from the Taliban insurgency. The surge saw international forces in Afghanistan swell to about 140,000.

By Jan. 1, that number will be about 12,500 of mostly trainers and advisers.

The Marine Expeditionary Brigade-Afghanistan is the last U.S. Marine unit in the country, and the British forces at Bastion will be the last U.K troops to go home.

"The guys right now are mostly looking forward to getting home," said Marine Lt. John Pratson, 24, of Leonardtown, Maryland, as his team played touch football and lifted weights outdoors on the eve of the handover ceremony.

"It's been a long hot summer," he said.