In scenes familiar in junior football on park pitches on Sunday mornings, one of the goals started to lean over and had to be taken down and fixed, causing a 13-minute delay with the match poised at 1-0 to Togo.
To complete the farce, instead of playing out the last four minutes and whatever stoppage time there was, Namplandraza added an extra 16 minutes to the match.
Fortunately for organisers, the extra time did not change the outcome of the group.
The goal frame started leaning out of shape in the 86th minute after Algeria midfielder Adlene Guedioura hauled himself on to the netting in frustration after another attempt on goal came to nothing.
Play continued for a few moments until Madagascan referee Hamada Namplandraza noticed something was wrong, setting off the delay as a posse of men tried to fix it by holding the leaning post upright.
They then removed the whole goal frame as bemused players and 20,000 spectators watched on.
"The stoppage helped us to score our second goal," said Togo goalkeeper Kossi Agassa after Dove Wome wrapped up the match shortly after the resumption of play with a neatly taken goal.
Stadium manager Gary Parker-Nance said the staff involved were left with little option but to replace the goal frame.
"The bottom of the stanchion was broken and had to be replaced. At times like that you just have to get it fixed, keep calm and do it as quickly as you can," he said.