Afghan Lieutenant Amanullah said he was ready to fight to the death to stop the Taliban making gains across the south of the country, where insurgents have already overrun a series of districts in their traditional heartland.
In November, 15 months after joining up, he deserted, one of thousands of tired and frustrated soldiers who have shed their uniforms, seriously blunting the Afghan army's power to repel a growing militant threat.
For Amanullah, everything changed late last year when, fighting on an empty stomach and without being paid for months, militants armed with rocket-propelled grenades and machine guns attacked his base from all directions in a three-day battle.
The final straw came when requests for reinforcements at the remote outpost went unanswered and colleagues bled to death around him because of a lack of medical care.When the ambush ended, he joined three friends shedding their uniforms and walking away from the base near Kandahar, an area that has long been a Taliban stronghold. "I joined the army so that I could support my family and serve my country, but this is a suicide mission," said Amanullah, 28, who, like many Afghans, uses one name.
The attrition rate hits at the heart of the U.S. exit strategy in Afghanistan, which is to build a force capable of taking on the Taliban when it fully withdraws.
NATO ended its combat mission in Afghanistan at the end of 2014, and a smaller force remains mainly training and advising Afghans. Alarmed by Taliban gains, the United States decided last year to slow the pace of withdrawing troops still there.
In 2015, the Afghan army had to replace about a third of its roughly 170,000 soldiers because of desertions, casualties and low re-enlistment rates, according to figures released by the U.S. military last month. That means a third of the army consists of first-year recruits fresh off a three-month training course.
The turnover rate is one of the most serious problems faced by Afghan security forces, according to Michael Kugelman, a senior associate for South and Southeast Asia at the Woodrow Wilson International Center for Scholars.
"These high turnover issues increase the possibility that when U.S.-led forces leave Afghanistan for good, whenever that is, they will be leaving Afghan forces unable to fend off a still-ferocious insurgency," he said.
The United States has spent around $65 billion preparing fledgling Afghan security forces, intended to number about 350,000 personnel, for when it leaves.
U.S. General John Campbell, commander of U.S. forces in Afghanistan, told Congress in October high attrition rates are because of poor leadership and soldiers rarely getting holiday.
In some areas, soldiers "have probably been in a consistent fight for three years," he said.
When the Afghan army in 2015 took over almost all combat operations for the first time since the Taliban were ousted, casualties rose 26 percent, according a NATO military officer. About 15,800 soldiers were wounded or killed, or almost one in 10, according to the officer, who asked not to be named.
Despite the challenges, the overall size of the Afghan army remains stable. Afghans willing to risk their lives for a basic monthly salary of about $300 a month equal those walking away.
The army has been running adverts on prime-time television that show inspiring images of resolute soldiers on training exercises, eating in well-stocked mess halls and with good kit.
But on the frontlines, army and police deserters complain of commanders having no answer for deadly ambushes, no broader strategy for prevailing in the war, corruption among their leaders and poor food and equipment.
"Barely a day passed without gunfire, ambushes, roadside bombs," said Farooq, a police officer from Helmand province, who quit his job three months ago. "We were treated as if we had no value and our job was to get killed."
Sediq Sediqqi, spokesman for the interior ministry, said the government was working to improve conditions for security forces and praised their work under difficult circumstances. "We are very happy with the commitment of the police and soldiers," he said.
Since quitting his job, Amanullah said he has been struggling to find work in a nation with one of the lowest labor participation rates in the world. He has decided to reapply for the army.
"I am hoping to work in a safer region and under better commanders," he said. "I am just waiting for their response."