Home-grown midfielder Mouhssine Moutouali converted an 84th minute penalty to help ensure Raja Casablanca became only the second African team in history to reach the Club World Cup final as they defeated Brazilians Atletico Mineiro 3-1 on Wednesday.
The Moroccan champions, who qualified as the host team, equal Congolese club TP Mazembe who lost the 2010 final against Inter Milan, and will now face European champions Bayern Munich in Saturday's final in Marrakech.
However, unlike Mazembe, Raja did not even qualify for the tournament, taking part only because they are the champions of the host country -- making their achievement all the more impressive.
Striker Mouhcine Iajour, who was on the scoresheet during the 2-1 extra-time quarter-final win over Mexicans Monterrey, hit the target to send the partisan 35,000 crowd into hysterics with the opening goal six minutes into the second-half.
However the lead was short-lived as former world player of the year Ronaldinho levelled 12 minutes later when he beat Khalid Askri in the home goal.
The game appeared to be heading towards extra-time before Rever brought down Iajour in the box, allowing Moutouali to become the hero, smashing home the ball with just minutes remaining.
Then deep into injury time, Central African international Vianney Madibe capped a glorious night in Raja's history with their third goal, to the delight of their Tunisian-born 63-year-old coach Faouzi Benzarti, who has enjoyed three spells at the helm of his national team and also won the African Champions League in 1994 with Esperance.
The Brazilians, whose 50-year-old coach Cuca is equally well travelled and working for his 20th club, had held the upper hand during a scoreless first-half that saw them manage seven shots, but only one on target.
Raja came back into the match as the half wore on and possession was equally shared by the time Spanish referee Carlos Carballo sent the two teams in at the break on level terms.