Afghan fans celebrate a goal by the Afghan soccer team during the final game of the South Asian Football Federation Cup against India, in the Taj Begum Restaurant in Kabul on Sunday. (AP Photos/Rahmat Gul) (Rahmat Gul/AP)

Sports echoed life on Sunday as Afghans watched their national soccer team self-destruct and lose the South Asian Football Federation Cup to bitter rival and host India, 2-1, in extra time.

A win would have been a rare moment of joy for Afghanistan, a soccer-crazy nation that has suffered four straight decades of fighting but had been on the upswing in soccer.

Instead, the surprise defeat seemed like the sporting equivalent of the country’s broader unraveling, as the Taliban, Islamic State and al-Qaeda have made gains in the past year since U.S. troops ended combat operations.

The atmosphere in Kabul was somber after the final whistle as fans trudged home from watching the game in public parks and restaurants with their Afghan flags soaked and their face paint smeared. It was a far cry from the jubilant scenes two years ago, when Afghanistan beat India in the finals of the same tournament to win its first-ever soccer trophy and some Afghans celebrated by wildly firing rifles into the air.

Other than conflict, soccer has been one of the few constants in this country, where life can change drastically depending on which force controls your town.

The Taliban tolerated soccer — barely. Players were made to wear long pants and beards, and cheering was restricted to chants of “God is great.” Sometimes, the Taliban would carry out brutal public punishments before a match, chopping off thieves’ hands on the field or executing an accused killer on the penalty spot.

Still, soccer was one of the only forms of entertainment allowed during their five-year rule, and Afghans became obsessed with the sport. When the Taliban fell in 2001, soccer fields sprang up around Kabul. Cars were emblazoned with the emblems of European teams. And the blood-soaked national stadium was given a layer of untainted sod.

Disbanded by the Taliban, the Afghan national soccer team was reorganized. Foreign coaches were hired to jump-start the moribund squad, and they turned to Afghan emigrants and their offspring.

“Lots of good talent has been recruited from all over the world, Europe and the USA,” said Mohammad Mashriqi, an Afghan American born in Flushing, Queens, and brought onto the team in 2010. A year later, he and his teammates made the federation final in India. Afghan pop and folk singers recorded songs predicting a victory, but the Afghans were blown out by the hosts, 4-0.

In 2013, Mashriqi and his teammates got their revenge when they beat India, 2-0, validating the songs and raising hopes that Afghanistan might climb out of the international soccer cellar, perhaps even qualify for a World Cup.

Mashriqi was overwhelmed to see the joy the trophy brought to the country his parents had fled almost three decades earlier. “When we won the tournament, the national happiness lasted for weeks,” he said by phone from New York.

Kabul’s buildings were draped in black, red and green flags on Sunday. Utility companies promised blackout-free service. Top Afghan officials tweeted photos of themselves sitting down to watch the game. And the Interior Ministry begged people not to “disturb public psychological comfort” with gunfire after a victory.

As dusk settled on the neighborhood of Share Naw, more than 500 young people crowded under a makeshift tent — its pole as worryingly tilted as the Tower of Pisa —to watch the final on a projection screen. It was as liberal a scene as one can find in this city. Teens with leather jackets and iPhones listed the team’s heavily tattooed captain, Faysal Shayesteh, as their favorite. Two years ago, a reporter for The Washington Post saw no women watching the final in public. This time, a dozen were seated together under the tent.

“If Afghanistan wins tonight, it will heal the country’s wounds from all the years of fighting,” said one young woman, Zahra Yagana. She said she was “a bit hopeless” about the direction of her country in recent months but hoped the players and fans would show unity. “All Afghans are tired of the war,” she said.

Fahim Farwak, a cleanshaven young man in a suit jacket, leather shoes and a salwar kameez traditional outfit, said he and several friends had organized the event in the park and promoted it on social media to support the team and counter negative images of Afghanistan.There is plenty of negative news going around, some of it real and some of it invented by our neighbors,” he said in a reference to Afghanistan's thorny relationship with Pakistan.

The crowd booed with every close-up of an Indian player's face, or when the computer streaming the game cut out, and cheered when the connection was restored or an Afghan player took a shot.

On social media, many Afghans pointed out that being able to watch the game peacefully in public — with women, no less — was a victory. Others, however, complained bitterly about the officiating.

And any illusion of national unity was dispelled shortly after the game, when gunmen stormed a building near the Indian Consulate in the northern city of Mazar-e Sharif, prompting a shootout with security forces. It was unclear whether the consulate was the intended target or what might have prompted the attack.