For once, Afghanistan was just another country. Used to being treated as victim or headache on the international stage, its athletes lined up at the Olympics to compete as equals and revelled in showing the world another face, unconnected to decades of conflict.

For Afghans back home, it was an emotional rollercoaster. Two weeks of competition brought the glory of the country's second ever medal, dashed hopes of a third, triumph in getting one over on its powerful neighbour Pakistan, and anger over the role of an old enemy – corruption.

The divided nation was seized by a brief, unifying fit of taekwondo fever as the diminutive fighter who is probably the country's biggest sporting hero took to the mats. Rohullah Nikpai, whose Olympic profile lists his profession as hairdresser, is an unlikely champion: a poor former refugee, he is from the Hazara ethnic minority, which has long faced discrimination from more dominant groups.

But his background meant nothing to millions of Afghans when he unexpectedly claimed a bronze medal in Beijing, becoming the first person from their country to stand on an Olympic podium.

Half of Kabul stayed up late to watch him clinch another bronze in London, and one of the city's regular power cuts sent men streaming out to ice-cream stalls and other shops with generators to catch the end of one fight.

There was joy across the country, and an explosion of excitement on social media, which has been embraced by the tiny but growing elite with internet access.

An international community pleased to have something to celebrate in the middle of a decade-long war jumped on the bandwagon, with congratulations from the US embassy and the Nato-led coalition that has been fighting in Afghanistan for more than a decade.

There was also elation that Afghanistan had bettered their richer and more powerful neighbour Pakistan, which has long been resented for interference in Afghan affairs.

"Afghanistan's Rohullah Nikpai wins Taekwondo bronze!! That's one more medal than its failed enemy, Pakistan," @Afghanpolicy crowed on twitter.

The only people not caught up in the excitement seemed to be the Taliban. "We are considering a reaction to this. Cannot say whether happy for the medal or not," a spokesman for the insurgent group told the BBC's Harun Najafizada.

The country's second medal hope, Nesar Bahawi – another taekwondo fighter – lost his bronze medal bout. But having fought with injuries so severe he was taken to hospital after the match, his bravery won the hearts of Afghans.

The aftermath of Nikpai's victory and Bahawi's near-miss also reflected some of Afghanistan's perennial problems. Government critics noted that Americans were faster than their own president to congratulate their double hero.

And there was anger when it emerged that the country's 22-strong Olympic delegation did not include a physiotherapist. Arif Paiman, spokesman for the Olympic committee headed by Lieutenant General Muhammad Zahir Aghbar, said London organisers provided doctors for all competitors. But both taekwondo fighters were battling with injuries that might have been better managed by someone who knew them personally.

Activists blamed corruption, a common scourge in a country that has been judged the fourth most graft-ridden in the world. "Because every post is a political position and acquired based on affiliations to warlords and power-holders, the position of head of the Olympic committee is given to an army general who should instead be fighting the insurgency up in the mountains," said activist Wazhma Frogh.

"[Yusufzai] isn't a trained sports expert, that's why he takes his bodyguards and friends on sports-related trips … while there was no physiotherapist for injured Bahawi."

Mokhtar Amiri contributed reporting