Cameroon legend Rigobert Song had been appointed as CAR boss in January, but Eloge Enza Yamissi was in the dugout instead after a dispute between the country’s football federation and sports ministry.
CAR had the perfect start against Madagascar in neutral Casablanca when Hugo Gambor beat the offside trap from a free-kick in the ninth minute and volleyed in from nine yards out.
But Malagasy captain Rayan Raveloson turned the game around with two goals in the space of five minutes, levelling with a first-time finish which deflected in off Gambor and then putting his side in front in the 21st minute with a diving header from seven yards out.
Arnaud Randrianantenaina flicked in a cross to make it 3-1 four minutes after the break and substitute Lalaina Rafanomezantsoa made the points safe in the 89th minute when he drilled in.
Martins has previously guided Mauritania to the Africa Cup of Nations, and the Frenchman now has Madagascar firmly in contention to secure a place at the World Cup finals for the first time.