Raja Casablanca became the second African side to reach a FIFA Club World Cup final after defeating Clube Atletico Mineiro 3-1 at Marrakech Stadium.
Raja would have the first chance of the match in the 13th minute from a corner kick by Issam Erraki who found Chemseddine Chtibi on the near post. Chtibi, who scored on his birthday against CF Monterrey in the quarter-finals, headed wide.
In the 18th minute Atletico Mineiro responded when Ronaldinho delivered a free-kick where Leonardo Silva headed just over the crossbar.
Four minutes later Atletico's Fernandinho passed to Lucas who bursted down the left wing to eventually cross to Jo who narrowly missed with his sliding left-footed effort.
In the 33rd minute an Atletico cross evaded Ronaldinho but landed at the feet of Fernandinho who misdirected his left-footed drive wide of the far corner.
After losing momentum the home side were able to get back into the tie in the 36th minute when Raja's Adil Karrouchy connected well with Mohssine Iajour on the left wing and passed the ball to captain Mohsine Moutouali. Moutouali's volley from five metres out was saved by Atletico goalkeeper Victor.
Raja would have another great opportunity four minutes later when Moutaouali launched down the right wing, cut inside and took a shot past Victor when he had an unmarked team-mate across goal.
In the 44th minute Raja sparked an effective counterattack followed a Jo miss when Iajour stormed into the penalty area and shot wide.
Nothing could separate the sides going into the half at an electric Marrakech Stadium.
The home side needed only six minutes after the half to break the deadlock when Iajour scored from 19 metres out after a swift counter attack.
Motivated by the home support, Raja threatened to score again two minutes later on another lightning-quick counter attack when Abdelilah Hafidi played Moutaouali offside.
Atletico would have their first chance of the second half one minute later when Diego Tardelli attempted to volley his shot from 18 metres out after a Raja defender had failed to effectively clear a cross.
In the 63rd minute Ronaldinho reminded the world of his free-kick specialty as he curled in his spot kick with pinpoint precision, hitting the inside post and most importantly bringing the South American champions level.
Brazil international Jo almost put Atletico ahead in the 74th minute but he was unable to generate enough power behind his headed effort which fell straight into the arms of a thankful Raja goalkeeper Khalid Askri.
The turning point came in the 84th minute when Atletico defender Rever felled Iajour inside the penalty area. Captain Moutaouali converted his penalty, sending Victor the wrong way and putting Raja back in front.
Atletico head coach Cuca was forced to push numbers forward in an effort to find an equaliser, leaving his team vulnerable to a Raja counter attack.
In the last minute of stoppage time Raja capitalised on Atletico's exposed defense when Moutaouali chipped over Victor, only to see his shot hit the crossbar and fall to the feet of team-mate Vivien Mabide who tapped home the rebound to secure passage to the final.
Raja become the second African team to reach a Club World Cup final after TP Mazembe in 2010, and will face FC Bayern Munchen on 21 December at Marrakech Stadium, while Atletico will play Guangzhou Evergrande in the match for third place earlier the same day.