Didier Drogba and former Chelsea team mate Salomon Kalou were among the goal scorers as the Ivory Coast twice came from behind to beat Senegal 4-2 in an African Nations Cup qualifier in Abidjan on Saturday.
Gervinho and Max Gradel scored the other goals to give the Ivorians a two-goal advantage ahead of next month's return leg in the final round of preliminaries for the 2013 finals in South Africa.
Three-time winners Cameroon, however, face an uphill struggle to avoid missing out on qualification for a second successive tournament after they lost 2-0 to the Cape Verde Islands.
Emmanuel Adebayor marked his first competitive game for Togo this year with a late equaliser in a 1-1 away draw with 2012 co-hosts Gabon.
Senegal stunned the home crowd by taking a 32nd-minute lead through Dame Ndoye before Kalou equalised soon after halftime. Papiss Cisse restored Senegal's advantage on the hour mark and the possibility of an upset against Africa's top-ranked team loomed large.
Ivory Coast, however, scored three goals in 20 minutes to turn the match around with Gervinho equalising in the 65th minute, Drogba adding a penalty soon after and Gradel scoring the fourth with five minutes to play.
Drogba also had a late effort disallowed.
Cameroon were without forward Samuel Eto'o, who is refusing to play for his country in protest against the team's management.