Once Caldas snatch Libertadores last 16 spot
Holders Internacional also reached the knockout phase as Group Six winners with a 2-0 home victory over Emelec of Ecuador with Mexico's Chiapas going through in second place.
Caldas, the 2004 champions who went into the match in Lima's port district of Callao bottom of Group One without a win, were under intense pressure.
The team had lost four Colombian league games in a row and the club were facing a domestic 30-day suspension over unpaid wages to the squad announced earlier in the day.
"I'm immensely happy. This (result) is thanks to the efforts of all the players and the coaching staff who stuck together in these difficult times," man-of-the-match Dayro Moreno told Fox Sports.
Caldas coach Juan Carlos Osorio said: "Great credit to the lads today with their response. They kept their goal intact without renouncing their commitment to attack."
Striker Wason Renteria put Caldas ahead after a quarter of an hour when he turned on Moreno's pass to shoot from the edge of the box inside the left-hand post.
Uruguayan midfielder Claudio Mirabaje increased their lead 16 minutes from time with a superbly placed free-kick and frustrated San Martin had two players sent off in the final 10 minutes.
Unbeaten Libertad of Paraguay, who had already qualified, won Group One with 14 points after a 2-0 victory over Mexico's San Luis in Asuncion. Caldas finished second with seven points, one more than San Martin.
In Group Six Internacional, crowned South American champions for the second time last year, finished four points ahead of Chiapas who qualified despite a 2-1 defeat away to Bolivia's Wilstermann. Emelec finished a point behind the Mexican team.
Former Brazil striker Rafael Sobis put Inter ahead early in the second half when Emelec's Argentine goalkeeper Javier Klimowicz appeared to stop his downward header only to let the ball slip from his grasp over the line.
On coach Falcao's debut in the competition having replaced the sacked Celso Roth, Inter went further ahead near the end with a goal from Brazil striker Leandro Damiao after Klimowicz had parried midfielder Pablo Guinazu's shot.
Wilstermann, playing in the competition after being relegated from the Bolivian first division at the end of last year, picked up their first win to finish bottom of the group with four points.
The other teams to have qualified before Wednesday's final games in Groups Three and Five include former champions Cruzeiro, Estudiantes, Gremio, LDU Quito, Penarol and Velez Sarsfield. Colombia's Atletico Junior and Universidad Catolica of Chile are also through.