Jonathan Wilson traces two contrasting routes to the tournament – that of Equatorial Guinea, cobbled together with players from around the world, and post-Qaddafi Libya.
Small steps and giant leaps in the African Cup of Nations
The opening game of the 28th African Cup of Nations began and ended in chaos. First, worrisome and potentially dangerous chaos. And, in the end, joyous chaos.
Before the match, the police reportedly created a crush by checking every ticket at the main gate to the stadium complex, even though those tickets were checked again at the turnstiles, and reacted to the rising danger by firing tear gas to disperse the crowds.
But that seemed forgotten a few hours later when Equatorial Guinea won their first Cup of Nations match, secured through Javier Balboa's goal with five minutes remaining.
The red-clad masses in the Estadio de Bata were giddy, the arena whirring with the beating of standard-issue red inflatable hands. In the streets outside car horns tooted. The joy seemed almost a delirium, something evident even on the pitch: when Balboa, moments after scoring, then struck a first-time shot sweetly, he ran away in half-celebration even as it pinged back into play off the bar. That evening, the owner of a hotel proudly showed around a battered photograph of her sitting next to Balboa on a sofa. "He is my friend's brother," she said, beaming.
This, by some distance, was the greatest moment in Equatorial Guinea's football history. In fact, it was pretty much the only moment in Equatorial Guinea's football history – until Wednesday, when the previously unheralded team produced a shock of seismic proportions to defeat Senegal and clinch an unlikely place in the quarter-finals with one game to spare.
David Alvarez's winning goal prompted Equatorial Guinea's players to sink to their knees and weep in celebration as fans in the 37,500-capacity Estadio de Bata went a bit mad. Hundreds invaded the pitch. The riot police marched several away before order could be restored.
The frenzied celebrations were understandable. Equatorial Guinea are ranked 151st in the world and 41st in Africa by Fifa. The country has only 2,600 registered players and no professional league. Putting together a squad for the tournament meant trawling the world for players with national heritage - or even just those willing to accept an Equatorial Guinea passport.
Other nations from Africa, and elsewhere, have been pursuing a similar policy for years, but Equatorial Guinea took it to extremes: only two of their 23-man squad were born in the country.
Henri Michel, the experienced French coach initially brought in to manage the side, favoured a tight-knit squad of local players. He quit twice over the constant influx of new discoveries, his second resignation, two weeks before the tournament began.
Players spoke of his opposition to the "Spanish contingent", many of them newcomers, including Balboa and the impressive winger Randy, being plucked from the Spanish second flight. His replacement, the Brazilian Gilson Paulo, has been appointed on a two-month contract; planning beyond the tournament clearly is not a priority.
Libya, by contrast, could hardly be more tightly knit.
They, too, have no great history of football success. Muammar Qaddafi, the ousted dictator, hated the game. His son, Saadi, famously loved football, running the federation and the Tripoli club Al Ahly, for whom he played, even making a brief and deeply inglorious spell as a player at Perugia, where he was voted the worst-ever Serie A signing.
The story is told of how the dictator, passing through Tripoli in 1979, saw names written on walls. Learning that they were invocations to great footballers, he was gripped both by jealousy at their popularity and, realising the passions the game could unlock, by fear; he closed down the league until 1982.
In 2000, Qaddafi was given a clear insight into the anarchic passions football can provoke. There had long been complaints that the league was rigged to ensure Saadi's Al Ahly would win. So supporters of the Al Ahly club of Benghazi, Libya's second city and for a long time the centre of dissent, dressed a donkey in a Tripoli shirt bearing Saadi's name and squad number and paraded it around the ground before kick-off.
When the refereeing again favoured Tripoli's Al Ahly, the Benghazi team left the stadium at half time. Bringing dogs with police as back-up, Saadi forced them to return to complete the game, which his side won 3-0.
For him, it seems, that would have been the end of it, but his father was furious, banning Al Ahly Benghazi for six years and razing their headquarters.
Other leaders saw in football the potential for propaganda success, but Qaddafi was so hostile to the game that he missed his great opportunity. Libya hosted the tournament in 1982 and performed creditably to reach the final, in which they lost on penalties to a very good Ghana side reinvigorated by the return of CK Gyamfi as coach. Qaddafi, though, had long since washed his hands of the tournament, his speech at the opening ceremony consisting of one sentence: "All you stupid spectators, have your stupid game."
It would not be accurate to say that the "stupid game" caused Qaddafi's downfall. Certainly not in the way that ultras of Red Star Belgrade and Partizan taking to the streets of Serbia's capital helped lead to the toppling of Slobodan Milosevic, or to the impact that Zamalek and Al Ahly ultras had in Egypt when they joined the demonstrations against Hosni Mubarak in Cairo. But it is the case that Libya's national football team has become the most obvious symbol of the post-Qaddafi Libya.
When the uprising began in Benghazi last February, Libya's captain was Tariq El Taib. He twice finished in the top 10 of the voting for African Player of the Year, had successful stints in Tunisia, Turkey and Saudi Arabia, and captained the national side the last time they reached the finals of the Cup of Nations, in 2006. Even at 34, he remains, most seem to agree, Libya's most gifted player. He is not, however, in the Cup of Nations squad. "Too old," is the explanation offered by Libya's Brazilian coach Marcos Paqueta.
It feels like a diplomatic evasion.
Last March, after Libya had gone top of their qualifying group with a 3-0 victory over the Comoros in a game played in Mali because of the conflict at home, Taib came out as a Qaddafi loyalist, describing the rebels as "rats" and "dogs". Three months later, before the return in Comoros, came the first obvious sign of dissent.
Walid Al Kahatroushi, who had scored the opening goal in the "home" game against the Comoros, heard a couple of days before the game of a friend who had lost his arm in the fighting. He decided he could no longer wear a shirt bearing the Qaddafi-era flag, and walked from the camp, the first anybody knew of his decision being when they saw him waving back at them from the other side of the gate. He visited his friend in hospital in Tripoli, then joined the rebels in the Nafusa Mountains near the Tunisian border.
At first his status as a footballer protected him, as the other rebels refused to allow him to the front. Eventually, though, the situation became desperate enough that he had to take up a gun. Once Qaddafi had fallen and been executed, Al Kahatroushi felt uncertain about returning to football, but was told by others that helping Libya qualify for the Cup of Nations was the best thing he could do for the fledgling nation.
Two other members of the squad, the midfielder Ahmed Al Saghir and the goalkeeper Guma Mousa, also joined the rebels. Al Saghir was shot in the shoulder and hospitalised for a month; Mousa survived the fighting unscathed.
Libya settled for a 1-1 draw in Comoros, which they meant they had to win their September 3 "home" game against Mozambique - played behind closed doors in Cairo – to have a chance of qualification. The green Qaddafi-era shirts were abandoned in favour of the red, white and black of the new government. An emotionally charged 1-0 win set up the decider in Zambia: win, and Libya qualified as group winners; draw, and they had a chance of one of the two qualifying slots available to runners-up.
Absurdly, in a preparation game against a Tunisian club side, Mousa suffered a serious knee injury. He was replaced by the 39-year-old Samir Aboud, who was inspired, making three top-class saves. Zambia also hit the woodwork twice, but Libya held on for a 0-0 draw, and with Guinea equalising late against Nigeria, made it through.
Libya are not the most gifted side, but they have resolve and a sense of common purpose. "In football we don't have to represent politics. We played with the first government, yes, but we represented the people of Libya and the country of Libya," said the midfielder Abdallah Sharif. "We are one of the people and we are still representing and playing for Libya and the Libyan people."
One emerging football nation forged in conflict, against another put together on the hoof via heritage and passports. On Saturday last, the latter, with an enthusiastic home crowd backing them, won out. Libya looked better on the ball, in some ways more composed and better organised, but the sheer zeal of Equatorial Guinea carried them through. In the celebrations, it seemed churlish to ask who had been born where.
"Nothing is decided as far as qualifying for the next round is concerned," Libya's Paqueta said. "This is not the end of our story."
After a 2-2 draw with Zambia on Wednesday Libya must beat Senegal on Sunday and hope Zambia lose if they are to progress.
In a sense, though, it hardly matters what Libya do; their victory is simply being there.