BEIJING (AP) — In Rohullah Nikpai's war-torn country, fighting is a part of life. Living in tough conditions is a given. Training for the Olympics is a luxury few can afford, or even imagine.

But Nikpai has proven it can be done: On Wednesday he won Afghanistan's first Olympic medal ever.

"I hope this will send a message of peace to my country after 30 years of war," Nikpai said after winning the bronze in the men's under 58-kilogram taekwondo event.

The victory brought immediate congratulations from President Hamid Karzai.

"The president personally called Rohullah Nikpai and congratulated him for this achievement," presidential spokesman Humayun Hamidzada said.

For his accomplishment, Nikpai will be given a house at the government's expense, Hamidzada said.

Nikpai, he said, serves as a "role model for many other Afghans."

The victory comes at an especially difficult time.

Afghanistan was under high alert Monday for fear of attacks coinciding with Independence Day, and the capital, Kabul, has had limited electricity. So following the Olympics has been a challenge even for those Afghans who care.

But given the war, lack of power and economic woes, many Afghans perceive the Olympics as a distant spectacle for other nations to enjoy.

Only four Afghan athletes came to Beijing, representing a country that had never won an Olympic medal and is sinking ever deeper into war as the Taliban insurgency escalates.

Sprinter Robina Muqimyar — who in 2004 broke the gender barrier on the Afghan Olympic team — was last in a field of 85 women in the 100 meters, with a time of 14.80. She ran with a scarf covering her head.

Teammate Massoud Azizi finished 76th in the men's 100. He trains in Kabul's National Stadium, where the Taliban once staged regular public executions, wearing jogging shoes because his spikes won't dig into the track's cracked, concrete surface.

But Nikpai, who is 21, has claimed a spot among his sport's elite.

To claim the medal, he won a stunning victory over taekwondo world champion Juan Antonio Ramos of Spain.

Nikpai said he started the Korean martial art when he was 10 because his brother had found a club in Kabul to train.

Not only was it an escape from the daily rigors of life in a country that not been at peace since the 1970s, he turned out to be good at it.

Exceptionally good.

With the help of his family and other supporters, he got to travel to international competitions, and last year won silver at one of the sport's premiere events — the world qualifiers in Vietnam's Ho Chi Minh City.

With success came better training conditions. After being selected for the national team six months ago, he has been able to use a special gymnasium.

But in a country where sports take a distant place behind the realities of war, few resources are dedicated to training athletes. Afghanistan has also had trouble gaining recognition for its national federations due to political divisions and concerns over the former Taliban regime.

"My training situation is a lot like the situation in my country," he said. "It's not good."

The news from the Olympics, however, is a rare ray of light.

The country has another chance at a medal in taekwondo. Nesar Ahmad Bahave, the silver medalist at the 2007 world taekwondo championships in Beijing, is competing in a heavier weight class.

And for Nikpai, there is an added bonus.

Along with the president's offer of a house, Nikpai's bronze medal also brings him a US$50,000 prize from a mobile phone company in Afghanistan.