Raja Casablanca scored twice in the last 10 minutes to stun Brazil’s Atletico Mineiro in their Club World Cup semi-final and earn a place in the final against Bayern Munich.
Raja, who qualified as champions of host nation Morocco, took the lead early in the second half when Mouhssine Iajour was sent clear on the right and fired a low shot past Victor.
But former Barcelona and AC Milan star Ronaldinho curled a free-kick in off the post to level for the South American champions.
Raja regained the lead in the 83rd minute when Rever was adjudged to have tripped Iajour, although replays suggested no contact was made.
Mohaine Moutaouali fired home the controversial penalty in the 83rd-minute and Vivien Mabide wrapped it up in the fourth minute of stoppage time with a breakaway goal.
At the end of the match Raja fans surrounded Ronaldinho to ask for his shirt and took off his boots.
Raja will now face European champions Bayern in Saturday’s final in Marrakesh.
It will be only the second time since the tournament has been played in its current format in 2005 that the final has not been between a South American and European team.