Denmark - 2 Bulgaria - 0: A strange game, in a venue featuring a mountain face behind one net and a grassy knoll behind the other, ended with twists and turns that leave Denmark on the cusp of the quarter-finals and Bulgaria out of the tournament with a game to play.
Bulgaria's final match is against Italy in Guimaraes next Tuesday, the same night that Denmark meet their neighbours Sweden in Oporto.
Having taken the lead through Jon Dahl Tomasson a minute before half-time, Denmark clearly played with Sweden in mind during a second half subdued until the 84th minute when Bulgarian substitute Zdravko Lazarov was brought down by Niclas Jensen on the edge of the Denmark area.
The Portuguese referee Lucilio Batista ignored Lazarov's pleas and was chased by several Bulgarian players including the captain, Stilian Petrov. Petrov was booked for dissent and having been shown a yellow card a few minutes earlier he was sent off.
Then, with the game petering out, Jesper Gronkjaer added a second in the fourth minute of injury time. Gronkjaer's celebration was muted, understandably.
The goal capped a dramatic period in the winger's life. He only met up with the Denmark squad this week after the funeral of his mother. Yesterday Birmingham City confirmed that Gronkjaer was leaving Chelsea for them. Denmark's coach Morten Olsen thought the emotional activity too great to start Gronkjaer but an injury to Dennis Rommedahl midway through the first half meant that on Gronkjaer went. "He's shown fantastic character," said Olsen.
The Bulgaria coach Plamen Markov could not say the same of his players and to his credit he did not try.
In total six Bulgaria players were booked yesterday, three as they took out their frustration on Denmark's most influential player, Everton's Thomas Gravesen. Bulgaria had four booked in their opening game, the 5-0 defeat by Sweden.
Markov refused to blame the referee afterwards. Nor did he excuse the foolish behaviour of Stilian Petrov. Markov was annoyed about the Lazarov incident but the foul hardly constituted a turning point.
Despite the scoreline against the Swedes, Bulgaria had been quite lively, but here they were cautious. They had two chances in the 90 minutes and both came within 60 seconds towards the end of the first half.
Marian Hristov headed the first limply after Thomas Sorensen had fumbled a cross; Martin Petrov squandered the second when free in front of Sorensen after a lovely touch from Dimitar Berbatov.
Otherwise it was all Denmark. Rommedahl on the left and Martin Jorgensen on the right had set the tone with speedy bursts from the start. Twice the Bulgaria right-back Vladimir Ivanov cleared the ball off his own line with his goalkeeper Zdravko Zdravkov beaten and Zdravkov also made a smart save from Gronkjaer.
Gravesen was bullish. It was he who originated the pass that sent Jorgensen free of the Bulgaria defence once again. Seeing Zdravkov approach, Jorgensen knocked the ball sideways for Tomasson, who tapped the ball into the open goal.
Denmark sat back after that and prepared for Sweden. They are in a position to qualify for the last eight. "Yeah," laughed Olsen sarcastically, "sure we want to make a deal with Sweden."