Surprise package Zambia reached the quarterfinals of the African Cup of Nations with a 2-1 win over Gabon to top its group ahead of tournament favorite Cameroon Thursday. Coach Herve Renard's team moved from last place to first after securing its first win with goals from Rainford Kalaba and James Chamanga, while Cameroon came twice from behind to salvage a 2-2 draw with Tunisia in Lubango. Zambia tied with second-placed Cameroon on four points. Gabon also finished with four points, but missed out on goals scored between the three teams. Tunisia, which didn't lose a game, had three points in the closest group of the tournament. “We are grateful we have been able to achieve something. Everyone thought it was impossible but we have now proven it is possible,” Zambia captain Chris Katongo said. There was some confusion after both games ended, with African Football Confederation officials saying Cameroon finished first in the group thanks to a better head-to-head record following its 3-2 win over Zambia earlier in the competition. But according to CAF regulations, FIFA later confirmed that Zambia was on top because it scored more goals against the two other sides. CAF issued a statement late Thursday confirming Zambia's first place. “Zambia is first because of overall goals scored in Group D, Cameroon is second and Gabon is third,” CAF said. In Monday's quarterfinals, Zambia and Nigeria will meet in Lubango, while Cameroon will face two-time defending champion Egypt in Benguela. Gabon players thought they had qualified and were celebrating after the match until they were told they were eliminated. In Benguela, Zambia broke the deadlock in the 27th minute when Katongo set up Kalaba who coolly slotted home. Maintaining its domination after the interval, Zambia doubled its lead in the 64th when Chamanga fired home from Jacob Mulenga's perfect pass. Do Marcolino scored a consolation goal in the 83rd with a curled shot that was deflected. Earlier, Tunisia's Amine Chermiti headed in Khaled Souissi's cross in the opening minute before Cameroon substitute Achille Webo set up Samuel Eto'o for the equalizer in the 46th. Tunisia reclaimed the lead when Cameroon defender Bayard Chedjou beat his own goalkeeper with a header in the 63rd, but Landry Nguemo leveled inside a minute. Tunisia's Ammar Jemmal was sent off in the 86th after picking up a second yellow card. The cup resumes with Sunday's quarterfinals between Angola and Ghana, then Ivory Coast vs. Algeria. Racing beats Osasuna In Madrid, Gonzalo Colsa's and Papakouly Diop's second-half goals gave Racing Santander a 2-1 victory over Osasuna in the first leg of the Copa del Rey quarterfinals Thursday. Colsa's rocket of a shot from outside the area flew undisturbed into the left side of goal with screened goalkeeper Roberto Fernandez watching flat-footed in the 63rd minute. Substitute Diop stepped up to the same spot to curl a right-footed shot inside the opposite post in the 84th. But moments after saving Albert Camunas' point-blank header along the goal-line, goalkeeper Mario Fernandez couldn't reach Walter Pandiani's low curler in the 89th as Osasuna took a valuable away goal into next week's return leg.