A cold autumn mist seasoned with woodsmoke hangs over the stadium on what was no man's land during Sarajevo's four-year siege – the first Serbian machine-gun post was just behind the goal where the "maniac crew" of Željeznicar Sarajevo sing and the electronic scoreboard now stands. Tonight, it shows a result of 2-0 in favour of Željeznicar against Celik Zenica in the Bosnian cup.

Not long ago, one of those players in blue for "Željo" – the rail workers' team when founded in 1921 (željeznicar means railway) – was Edin Džeko, now of Manchester City and among the greatest Bosnian players ever. On Friday, Džeko will lead the attack in the most important game that his country has ever played – a first leg against Portugal for a place in next year's European championships.

Not only would victory give a country that still bears the scars of war its redemptive first-ever berth in an international competition, but it would also come after an atrocious year for football in Bosnia and Herzegovina.

There are no away fans at Željeznicar's stadium tonight, nor are there any at any game in Bosnia. A ban was imposed after fierce ethnic fighting at four recent matches, involving all three ethnicities and all three Sarajevo teams. In Bosnia, until now, most Bosnian Serbs have supported Serbia, most Bosnian Croats have supported Croatia and the fan base for the Bosnian national team has been mostly Muslim, or "Bosniak". The organisation of the game has until now reflected the legacies of war. The Bosnian football association was run by political appointees unconnected to the game, ensuring that it was servile to ethnic interests. These were a Muslim former minister for police, a Croat general and a direct appointee of Milorad Dodik, the president of the Bosnian Serb statelet within Bosnia, whose avowed programme is to wreck any state-wide institution.

All this is now changing, however, and Friday's game puts the changes to the test. Throughout, the Bosnian national side itself – and teams like FK Sarajevo – have on the pitch been the country's only functioning multi-ethnic organisations. There is no ethnic veto over a pass down the wing or a cross into the penalty area. Džeko is a Bosniak Muslim; the national team's most experienced player and co-captain Zvjezdan Misimovic is Serb; the defender Boris Pandža is Croat.

In support of this groundbreaking team, its fans led a revolution against the Bosnian FA. They organised demonstrations, boycotted matches and staged their own all-star games; they disrupted a game with flares in Oslo for an hour – and they won. In April this year, Uefa and Fifa expelled Bosnia from international competitions until its FA was reformed. Bosnia was readmitted after political appointees were sacked and the association taken over by a "normalisation" committee of sporting figures and heroes. In parallel, Yugoslav and FK Sarajevo footballing legend Safet Sušic was appointed as the team manager, and he in turn enticed back key players who had refused to play under the previous regime.

The fans, the "BH Fanaticos", are led from Bosnia, and include members of the diaspora scattered across the world, refugees who survived massacres, concentration camps and ethnic cleansing. Their spokesman in the capital, Nizar Smajic, says: "The politicians wanted to impose their interests on our game. We didn't set out to challenge anything political – we just wanted our game back. But politics found us, because politics are everywhere. Now we need to qualify, and the situation will really start to change – we can be rid of all this ethnic shit. If we go to Poland [where the 2012 contest will be staged], we'll take tens of thousands of fans. We took 15,000 to Paris, and most of us missed out on our holidays this year, saving up to go Poland and Ukraine instead."

Such is the excitement in Bosnia that it is also infecting the other, Serbian, side of Sarajevo. Mico Simanic – who used to support FK Sarajevo but felt obliged to switch to (Serbian) Slavija after the war – says over coffee in a bar: "If you told me 10 years ago I'd feel something for the Bosnian national team, I'd have said, as a Serb: 'Never!' But I'll be watching and wanting them to win".

The furthest Željeznicar ever got in the Uefa Cup was a semi-final in 1985, losing out in a final against Real Madrid to a late goal by the Hungarian team Videoton. The keeper who let it in, Dragan Škrba, a Bosnian Serb who owns the bar, adds: "Of course I want Bosnia to qualify – it's just what we need, and Džeko is the big factor."

There is no overestimating the phenomenon of Edin Džeko – whose first, magnificent, goal for Bosnia I saw at Sarajevo's Koševo stadium – in the team's success, in the importance of Friday's match and in the aspirations and lives of Bosnians at home and across the diaspora.

Asim Selimovic, who spent his childhood in besieged Srebrenica and was dressed as a girl by his mother to avoid the slaughter in 1995, now lives and studies in St Louis, Missouri. He speaks for fans the world over when he says: "Džeko is a national idol. He is our pride and joy. When Džeko scores, every Bosnian refugee in the world has scored. He is our example, our hope."

There is an extraordinary story behind Džeko's rise – and an extraordinary man who nurtured it. Sitting in a café among the steep, narrow streets that climb above FK Sarajevo's stadium is Jirí Plíšek, from the Czech Republic, who was manager of Željeznicar for five months in 2004 and 2005, after which he left "because there were too many interests negatively obstructing the system I wanted." But Plíšek, now manager of FK Sarajevo, "kept my Bosnian heart", he says, and there was one player entirely unappreciated by Željeznicar's fans and management whom he desperately wanted to take back to his homeland. "Džeko had that mental attitude to the game that makes a special player. He needed to apply it, to make up for a lack of tenacity, so I put him in the second team. He was furious, and so were his parents. But it worked – he understood, and showed this inner strength, and the signs of special skill. It's my philosophy that everything cannot happen immediately, and there is no rule when a player will reach his peak. And I saw that Džeko was clearly going to get there." Željeznicar are so embarrassed at having let Džeko slip that they withdrew from an interview about Bosnia's big match.

Plíšek returned to his homeland to take over the Czech side Ústí nad Labem, sister team to first-division FK Teplice. He urged Teplice to buy Džeko for the €25,000 Željeznicar wanted for him. "Though it was a pittance, Teplice's attitude was: 'How can good players come from that place down there?' I said that if the club would not buy him, I'd borrow the money myself and do so. That convinced them."

With Džeko, Teplice won the Czech cup. In 2007, he moved to Wolfsburg, in Lower Saxony, Germany, for €4m, where he won a Bundesliga title and became top scorer in the club's history, then to Manchester City for £27m. Yet, unlike others, Džeko refused offers of both Czech and then German citizenship, which would have taken him to the World Cup finals, choosing Bosnia as his national side – partly his own personal commitment, but also because of the philosophy and counsel of Plíšek, a man of impressively thoughtful modesty. "These boys reach crossroads where they have to choose who they are, and some understand that glory and money are not everything", he says. "By choosing Bosnia, Džeko answered that crucial question, 'who am I?', and sent a message to his country, his parents and children. For me, this is how truly great players are made."

Now sitting on the bench at FK Sarajevo's ground, Plíšek huddles down in his seat as a bitter wind announces winter's imminence, blowing up the valley in which the stadium is surrounded by thickets of graves of those killed during the siege. Sarajevo battle to a 0-0 draw against current champions Banja Luka, and the home fans behind the goal shout dutiful abuse at the Serbs. But everyone's mind is set on yesterday's Sarajevo derby and, even more, on Friday's international game.

"In this country," says Plíšek, "if the politicians had their way, Bosniaks would have to pass to a Bosniak, Serbs to Serbs, Croats to Croats. But that's not how football works; football connects everyone, and has the face of every nationality. If they beat Portugal, these Bosnian boys will show the world what their country can do, that their talent can be used in a way the country should follow".