Marco Fabian continued his hot scoring run for Mexico and helped El Tri into the knockout rounds of the Gold Cup.
Kévin Parsemain pulled Martinique back into the game with a penalty just before the break, but El Tri managed to hold on to its lead in what was a very frantic final group game for both sides.
Fabian's opener came 21 minutes in when a save led to a rebound at the top of the box. The forward hit the bouncing ball back into the ground and it hopped over a line of Martinique players and into the goal to give Mexico a 1-0 lead.
Montes followed it up 13 minutes later with a left-footed laser from 25 yards out, giving the Mexicans what seemed to be a comfortable advantage over the regional minnow.
But Martinique crawled back into the match just before halftime with a goal from the penalty spot. Miguel Layun committed a sloppy foul in the box on Martinique's Steve Gustan, and Parsemain stepped up confidently to pull his team back into the match.
Despite the confidence that came from the goal, Martinique struggled in the second half. After a series of early mistakes from the Mexican defense led to a couple of half chances, El Tri settled in and Martinique struggled to find any way back level.
Mexico, on the other hand, had multiple opportunities to extend the lead, with Lugo, Fabian and Layun all getting looks at goal, and Raul Jimenez letting a golden chance to settle and shoot bounce past his shoulder and out of play.
The goal to finish things off didn't come until the 90th minute when the substitute Ponce touched home a low cross from Layun to secure Mexico a second win in a row.
With the win, Mexico advances to the knockout stages as the runner up in Group A.