So much for the World Cup legacy. As South Africa prepares to host the Africa Cup of Nations, it should have been celebrating the fact that it had the infrastructure to step in as host when civil war forced the tournament to be moved from Libya, showing off once again the infrastructure built for 2010. As it is, the South African Football Association is left dealing with a match-fixing scandal whose tentacles stretch across the world and that has forced its president and four other officials to stand down.

The president, Kirsten Nematandani, and the officials, Dennis Mumble, Lindile 'Ace' Kika, Adeel Carelse and Barney Kujane, were asked to "take a voluntary leave of absence" pending an internal investigation into allegations they were complicit in the rigging of matches by the convicted fixer Wilson Raj Perumal and his company Football4U. Among the matches under investigation were two friendlies played by South Africa, one against Guatemala, the other against Colombia, in May 2010, a fortnight before the World Cup began.

There is no suggestion players were involved in any illicit activity; Perumal's method was to manipulate referees. The 5-0 win over Guatemala has come under particular scrutiny. It was refereed by Ibrahim Chaibou of Niger, who has gained a reputation over the past few years for not being afraid to give a penalty.

Take, for example, Nigeria's 4-1 friendly win over Argentina in June 2011, which featured what might charitably be described as a soft penalty for a push in the back and a farcical one for a supposed handball in the eighth minute of injury-time. Bookmakers reported seeing a surge in bets on a fifth goal in the game in the final minutes (over 4.5 goals being a favourite ploy of fixers as a long-odds occurrence that raises little suspicion in retrospect).

Or take Ecuador's 4-1 friendly win over Venezuela in November 2010. It also featured two penalties that less eagle-eyed officials might not have given: the first for a collision in the box, the second for a handball.

In South Africa's win over Guatemala, Chaibou awarded three penalties, all for handball and all dubious: one, two, three.

South Africa's 2-1 win over Colombia, the inaugural match at Soccer City, refereed by the Kenyan official Samwel Langat Kipngetich, also featured three penalties, two of them extremely dubious and the first retaken after it was initially saved.

Chaibou, who retired after hitting Fifa's age limit, is seemingly missing, wanted for questioning. He was also in charge of the game in September 2010 in which Bahrain played a team masquerading as the Togo national team and led by the former Togo coach Bana Tchanile. With Bahrain's coach, Josef Hickersberger, baffled by his side's superiority – "They were not fit enough to play 90 minutes," he said. "The game was very boring" – the fake Togo lost 3-0 and it would have been 8-0 had it not been for five goals mysteriously ruled out for offside by Chaibou. That friendly was arranged by Wilson Raj Perumal.

Perumal, a Singaporean, was arrested in February 2011 in Rovaniemi, Finland, after police were alerted by an anonymous tip-off that he was using a false passport. They had tailed him for three days before making the arrest, watching in a French restaurant as he berated three players from the local club Rovaniemen Palloseura after they had drawn a game. Police contacted the Finnish football federation, who contacted Fifa. Its then head of security, Chris Eaton, knew Perumal was the biggest match-fixer in the game.

He had honed his skills in Zimbabwe and Ghana in the late 90s. Working for a syndicate run by Dan Tan Seet Eng, Perumal set up companies such as Football4U and Footy Media, arranging friendlies, which often involved little more than booking a stadium for a day and paying a fee to each federation. Crucially he would choose the referee.

Referees are paid only $350 per game by Fifa. Perumal later admitted to paying as much as $5,000 to players and coaches: nothing in terms of international gambling but a vast amount to a player living in poverty in Africa or Central America.

Once the fix was set, organised gangs across south-east Asia employed hundreds to place a series of bets of up to $3,000 online – the theory being that smaller bets were less likely to draw suspicion. At times bets were placed on matches that did not even happen, such as the notorious ghost game between the Under-21 sides of Turkmenistan and the Maldives when a local 'spotter' employed by bookmakers filed regular dispatches on an entirely fictional encounter.

Perumal's problem was that he developed a gambling habit of his own – and it turned out it is much harder to make money betting on games that are not fixed. It is estimated that in one three-month period he lost $10m. To recoup his losses he began taking money from his Triad bosses but not fixing the game, hoping the 'right' result would occur naturally. He became desperate, which seems to have led to the sloppiness of the Togo fix. It was after he attempted to buy Palloseura for $200,000 while telling the syndicate it would cost $500,000 that they decided to sacrifice him, sending another Singaporean to deliver the tip-off to police.

The syndicate was also making mistakes. In February 2011 Latvia played Bolivia and Estonia played Bulgaria in friendlies in Antalya, Turkey, matches arranged by Santia Raj, another employee of Dan Tan's men. Janis Mezeckis, the general secretary of the Latvia football federation, had his suspicions raised by the fact that Raj confirmed only the day before the game who the referees would be. He reported his concerns to Fifa who monitored betting patterns on the games; vast amounts were placed on there being more than 2.5 goals in each game. Sure enough, Latvia beat Bolivia 2-1 and Estonia drew 2-2 with Bulgaria, all seven goals coming from penalties. Six match officials, three from Hungary and three from Bosnia, were subsequently suspended. Perumal served a year in jail in Finland and is now in protective custody in Hungary.

There is nothing to suggest that the South African officials actively helped to fix the games and it may be that they were duped as so many others have been. While it is embarrassing for South Africa to have been involved with Perumal just before their World Cup and for the suspensions to have been announced shortly before the Cup of Nations, it is far better that the issue is dealt with than hushed up. What is truly worrying is that but for Perumal's gambling habit and Mezeckis's alertness, we probably would not have known about any of this.

Chaibou has been convicted of nothing but, if he was fixing games, he was extremely bad at it, generating a body of incriminating evidence that can be tracked down by anybody with 10 minutes and a decent internet connection. It seems staggering that he was allowed to referee without sanction for so long: if he was not fixing games, then he was a staggeringly bad referee who should have been disbarred on the grounds of awful decisions long ago. As Gabriele Marcotti has explained, a referee who is good at fixing games does not draw attention to himself: he books one team's holding midfielder early on, he warns a forward that he knows he is diving and has his eye on him, he tells a defender he has seen wrestling at a corner and will give a penalty next time: he unsettles and unnerves and so subtly shifts the advantage to one team. The result might go the 'wrong' way in the short term but over time the impact will be significant and almost untraceable.

Is there a solution? Other than constant vigilance – and trying to persuade Perumal to divulge even more than he already has – there probably is not, although tighter controls around friendlies with officials appointed by Fifa or the regional confederations rather than by agencies might help. And, of course, it would help if managers and fans did not muddy the waters by bawling and whining and making half-allegations every time a 50-50 call goes against them.