Afghans wave national flags on the streets after the national team for beat India 2-0 in the South Asian Football Federation Championship, a tough match whose result brought a rare moment of unity to this ethnically fractious, war-weary nation. (Ahmad Jamshid/AP)

The Afghan capital erupted in joyous pandemonium Wednesday night after the national soccer team defeated India to win the South Asian Football Federation championship. It was the first international soccer trophy ever for the war-weary nation and the first ebullient mass outpouring anyone here could remember.

Young men and boys poured into the streets as soon as the game ended, about 7 p.m., piling into caravans of taxis and trucks that careered through the streets for hours. They hoisted huge Afghan flags, whooping and shouting, “Long live Afghanistan!”

“After 30 years of war, the world thinks of Afghanistan as only having wars and violence. Today, we are showing that our young men can become world champions,” said Khalid Sadat, a fruit-seller who was watching the chaotic celebration in the downtown Shar-i-Nau commercial district.

Even without putting it into words, everyone in the streets seemed to be celebrating far more than a soccer victory. It was as if something had snapped after years of conflict, oppression and grim daily routines of survival. Suddenly, Afghans had an excuse to go crazy, and nobody was stopping them.

Horns honked nonstop, and car radios blasted Afghan pop and patriotic tunes. Dancing crowds overwhelmed traffic circles as grinning police looked on. Flares and rockets arced and sparked overhead, and celebratory gunshots rang out, but no one flinched.

Afghanistan beat India 2-0 in the final match of the South Asian Football Federation championship. Watch the highlights from the game. ( Championship)

Hundreds of people used their cellphones to record the event or called relatives outside the capital so they could hear the excitement. There were no women on the streets, a reminder of Afghanistan’s conservative social mores, but several people noted the ethnic diversity of the crowds, seeing a hopeful sign for national unity.

It was not lost on the celebrants that Wednesday was the anniversary of the Sept. 11, 2001, attacks on the United States that had branded their country a terrorist haven and plunged it into war once more. All day, national television stations here replayed film clips of New York’s twin towers falling and featured solemn interviews with experts about the event.

But as darkness fell, people began gathering around TV sets in bakeries and electronics shops to watch the India-Afghanistan game being broadcast live from Nepal — something that would not have been possible here even a few years ago, when there were few TVs or TV channels. As the Afghan team scored one, then two goals, while India remained scoreless, cheers could be heard across the city.

“We are celebrating because we have suffered so much for so long,” said Mohammed Basir, 30, an insurance agent in the crowd. “This day has brought hope for all Afghans. Now we can all celebrate with real joy in our hearts.”

There were hints of irony everywhere one looked. High-powered open pickup trucks, once used by turbaned Taliban squads enforcing a harsh moral code, were full of cheering, carefree young men in jeans and T-shirts. Elevated traffic police posts, like the one from which the Taliban hanged the Afghan president in 1996, were crammed with victory-party mobs.

Athletics, soccer included, were frowned on as immodest by the Islamist Taliban regime that was toppled in 2001, and soccer stadiums were used instead to publicly execute adulterers and others who broke the rulers’ strict religious and moral rules. Dancing and singing were banned, and public celebrations were unthinkable.

Before the Taliban took over, many young Afghans spent their high school and college years fighting, first in a brutal war with the Soviet Union in the 1980s and then a ruinous civil conflict in the 1990s that destroyed much of Kabul. More than a million people died.

In recent months, the country has been consumed with worry about whether things will fall apart again when U.S. forces leave and a presidential election is held next year. There have been predictions of economic collapse, political chaos and a Taliban takeover.

But for a few hours Wednesday night, with the neon lights of new restaurants and shopping centers illuminating the streets, and a new generation of students and sports fans capturing the raucous street party on their cellphones, the grim past vanished and the future seemed to glimmer ahead.