Ali was among thousands of young men who was enlisted in 2010, a year before the brutal repression of anti-government protests in Syria spiralled into one of the worst conflicts of the century.
He thought he was joining the military for a maximum of two years, but instead ended up serving in Syria's war until now.
His drawn-out deployment ended last Friday, after the army ordered 2010 conscripts to demobilise.
"I'm finally leaving guns and dirt barricades behind," said the ecstatic 34-year-old, who hails from the central city of Homs but was last deployed hours away in Syria's south.
As he packed, Ali's phone buzzed with calls from loved ones congratulating him, but also from comrades for whom the good news had not yet arrived.
"We're the first ones and you will join us," he reassured a friend over the phone. "The biggest battles are over."
The number of frontlines has diminished now and Syria's regime has retaken more than half of the country with Russian backing, this year notching up a string of victories against rebels near Damascus.
Before he zipped up his black canvas bag, Ali dropped in the gourd and traditional straw he had used to slurp bitter mate tea throughout the seven-year war.
"I'm keeping" these, he said. "They were my companions throughout my military service."
All packed, he posed with fellow fighters for their first group picture out of army slacks, before heading their separate ways back to civilian life.
- Hero's welcome -
Before Syria's conflict erupted in 2011, men 18 and older had to serve up to two years in the armed forces, after which they remained part of the reserves.
But when war began, anyone enlisted stayed on active duty.
The government's 300,000-strong army is estimated to have been nearly halved by deaths, injuries and defections, and conscripts kept having their deployments extended.
Mohammad Damour had always wanted to become a reporter, but his dreams were postponed when his 18-month deployment turned into an eight-year tour.
"War set me back 10 years, but I was demobilised today," Damour told AFP in a bustling market in Damascus, snapping pictures of sweet stands with his camera.
"I was supposed to have graduated at 22. But I'm 27 and still in the first year of journalism school," he said.
On the edge of Syria's second city Aleppo, Maher Daro's family had prepared a hero's welcome.
His father was waiting to ferry the returning soldier home in a sleek black Mercedes, specially festooned with red and white flowers. He had even hired a drumming band.
As soon as Daro pulled up in his car, the drums kicked off, celebratory gunfire rang out, and relieved relatives broke into a traditional Arabic circle dance.
Daro's mother and sisters let off shrill ululations typically heard at weddings and other celebrations.
"It's like a new birth," Daro said. "Those who go to war are lost, and those who return are born again."
Grinning from ear to ear, he embraced long-lost friends and distributed sweets to those who had come to greet him.
Late at night after most guests had left, he regaled his closest friends with stories from the front, including the former rebel bastion of Eastern Ghouta outside Damascus that the regime recaptured in April.
- 'Where will I go?' -
Syria's government has recovered more than half the country, bolstered by air strikes from its Russian ally, by local militias and regional fighters.
The army has replenished its ranks with thousands of young men living in these areas who had not completed their compulsory service.
"It's a five-star war now," said Daro. "Everywhere I fought is safe now: Damascus, Homs, Latakia."
But such a warm welcome was not in store for all.
In a military barracks outside Damascus, Mohammed Ala, 31, huddled in a corner of his room after hearing he would be among those demobilised.
"Where will I go?" he asked again and again, cupping his forehead in his palm.
Ala, speaking under a pseudonym, said he was cut off from his northern home city of Raqa after it was overrun by rebels and then the Islamic State group, before falling to US-backed fighters.
His family had fled to Turkey, and he had no way to reach his childhood home and beloved farmland.
"I would spend all my leaves at the barracks," he told AFP on the eve of the demobilisation order.
"But in a day's time, I have no idea where I will sleep, or what I will eat or drink."
Ala gazed nostalgically at an old picture of his mother, fretting over what awaited him.
"For those without shelter, military service was the closest thing to a fixed job with a decent salary," he said.