American and British flags are lowered at the Bastion-Leatherneck military complex in Helmand Province. The ceremony marks the official end of British and American operations in the southwestern province. (Reuters)

The NATO coalition ended its formal mission in restive and dangerous Helmand province Sunday, handing over two major bases and an airstrip to the Afghan military as U.S. Marines and British forces prepare to withdraw.

The transfer of Camp Leatherneck and Camp Bastion, the hub for coalition forces in southwestern Afghanistan, is the most dramatic signal to date that the 13-year-old war is drawing to a close.

For now, British forces and U.S. Marines will continue to secure the perimeter of the adjoining bases while they await orders to withdraw completely. When they do, it will essentially mark the conclusion of the war in Afghanistan for the Marines and British forces, officials in both countries said.

“This is truly a historic day,” said U.S. Army Lt. Gen. Joseph Anderson, commander of the International Security Assistance Force Joint Command. “Years of continuous combat, countless hours of sunbaked patrols and numerous casualties — this day marks the end of the [coalition] mission here in southwest.”

British Defense Secretary Michael Fallon acknowledged that “mistakes were made” in Afghanistan by politicians and generals, comments that will add to the long-running debate in Britain about whether the mission was worth it.

U.S. Marines load equipment onto a C-130 transport aircraft on Oct. 25 as they prepare to withdraw from the Camp Bastion-Leatherneck complex at Lashkar Gah in Helmand province. (Wakil Kohsar/AFP/Getty Images)

“Mistakes were made militarily, mistakes were made by the politicians at the time, and this goes back 10, 13 years, some time now,” Fallon told the BBC on Sunday. “But let’s don’t ignore what has been achieved.”

Fallon said the majority of British troops would be home by Christmas.

Although about 34,000 coalition troops remain in Afghanistan, President Obama has pledged to cut that number in half by January. Under a security agreement that Afghan President Ashraf Ghani recently signed with the United States, Obama plans to keep 9,800 troops in Afghanistan next year.

About 3,000 troops from other nations are also expected to remain in Afghanistan to help train and support the Afghan army and police force.

Sunday’s ceremony means Afghan security forces now have full access to a sprawling military complex that includes more than 6,500 acres of desert land.

The handover includes the transfer of at least $230 million in coalition assets to the Afghan army — mostly dozens of miles of concrete roads as well as hundreds of buildings, generators and air conditioners — and sets the stage for one of the U.S. military’s largest overseas base closures since the end of the Iraq war, coalition officials said.

Since the fall of the Taliban in 2001, some of the bloodiest battles of the Afghan war have occurred in Helmand. About 400 British soldiers have been killed there, as well as more than 350 U.S. Marines.

U.S. Marines lower their flag during a handover ceremony in Afghanistan’s Helmand province on Oct. 26 as the last U.S. Marines unit and British combat troops end their Afghan operations. (Omar Sobhani/Reuters)

As coalition forces ended combat operations last year, the numbers of casualties they suffered in Helmand slowed dramatically. But Afghan forces continue to meet stiff resistance in the province, raising considerable doubts about their ability to prevent Taliban advances.

Over the summer, Afghan forces faced repeated attacks near Sangin, a town in northern Helmand that is close to some of country’s most abundant and profitable poppy fields. But Afghan and coalition commanders say the Taliban offensive largely failed, which has boosted the morale of Afghan troops.

“I can assure you, the ANA has already been conducting operations by themselves, in the battlefield, and no district has been taken over, no checkpoint has been taken over by the Taliban,” said Maj. Gen. Sayed Malouk, commander of Afghan army’s 215 Corps in central Helmand. “We are ready.”

But a visit to the British and American bases here underlines the extent of the support that Malouk’s forces will be losing.

In one coalition command center Saturday afternoon, a dozen Marines watched a video screen with live footage of a suspicious car driving miles from the base. And on Saturday night, the silence of the desert was repeatedly punctured by outgoing rocket fire.

Coalition officials said they were illumination rockets to help Afghan security forces engaged in an operation nearby.

“We are really going to miss our friends, but if we need anything, we can e-mail them,” said Mohammad Nasim Sangin, an Afghan army commander in central Helmand.

The Pentagon’s post-2014 plans for Afghanistan call for Afghan troops in Helmand and neighboring Nimruz province to rely on assistance from coalition forces based in neighboring Kandahar province; in Kabul, the capital; or in Herat, a province in the country’s west.

Obama’s decision to leave just 9,800 troops in Afghanistan caused coalition officials to abandon plans to keep troops in Helmand. As recently as late 2011, at the height of Obama’s troop surge in Afghanistan, as many as 40,000 American and British troops and contractors lived on Camp Bastion and Camp Leatherneck.

Now, the once-bustling complex looks increasingly like an abandoned city.

Over the past three months, the Afghan contractors who helped maintain the complex have been sent home, leaving it to Marines to empty garbage cans. About a month ago, their base convenience store and dining facility closed, leaving troops desperate for cigarettes and food other than MREs, or meals ready to eat.

“They had WiFi for a while, but that went away on Oct. 11,” said James Pauly, a 23-year-old Marine from Camp Pendleton, Calif., who said he can no longer Skype with his family.

Karla Adam contributed to this report from London.