Soufiane Rahimi and Gessime Yassine came off the bench to help Morocco rally for a 4-2 victory over Haiti on Wednesday and erase the Caribbean nation's hopes of a first ever point at the World Cup. Morocco, which became the first African team to reach the World Cup semifinals four years ago in Qatar, twice came from behind against a team playing on soccer's biggest stage for the first time in 52 years, The Associated Press reported. Rahimi’s deflected shot in the 78th minute put Morocco ahead 3-2 and Yassine killed off any chance of an upset with a goal in the 89th. Morocco advanced to the round of 32 in second place behind Brazil in Group C and will next play the runner up in Group F — Netherlands, Japan or Sweden — in Monterrey. The five-time champion Brazilians beat Scotland 3-0 in the other group match. “At times we lacked humility and paid the price for it," Morocco midfielder Bilal El Khannouss said. "We weren’t fully committed in the duels, we gave them confidence and allowed them to grow into the game and score twice. At halftime, the coach told us we needed to be more aggressive, win the second balls and bring greater intensity to our attacking play.” Morocco, which won the most recent Africa Cup of Nations, has ambitions to go deep again after making history at the last World Cup. But the team was given a scare by Haiti, which took a surprise lead in the 10th minute with a goal that was more than five decades in the making. Lenny Jospeh’s back-heeled flick at the near post went in off the back of Morocco goalkeeper Yassine Bounou for the country's first World Cup goal since Emmanuel Sanon in 1974, Haiti's only other appearance at the tournament. Bounou was officially credited with an own-goal on the play. Morocco pushed for an equalizer and Achraf Hakimi finally got it in the 39th minute. Haiti keeper Johny Placide managed to get a hand to El Khannouss’ deflected cross, but couldn't prevent Hakimi from bundling the ball over the line. Although Morocco looked to be ready to explode for more goals, it was Haiti that again took the lead four minutes later when Wilson Isidor scored from outside the box with a shot that flew into the top corner. There was still time for another goal at the end of a thrilling half with Ismael Saibari sweeping Hakimi’s cross past Placide in stoppage time to make it 2-2 at the break. It was Saibari's third goal of the tournament. “I am disappointed for the Haitian fans," Haiti coach Sébastien Migné said. "Disappointed, but also, I want to say we managed to show that we were worthy of this qualification. We were in the right place. Now we need to make some improvements and not wait for another 52 years.”