The match made World Cup history when Farid Mondragan beat Roger Milla’s record as the oldest player at any finals tournament. The goalkeeper came on as a substitute for the last six minutes at the age of 43 years and three days.
Martinez’s two second-half goals broke Japanese hearts after the Blue Samurai had equalised on the stroke of half-time to keep their hopes alive in Cuiaba.
Colombian fans decked out in yellow turned the stadium into a home fixture, hugely outnumbering their Japanese counterparts as coach Jose Pekerman made eight changes to his starting line-up.
The new-look team started brightly but once Japan settled they enjoyed the lion’s share of the possession, with Shinji Kagawa — restored to the starting XI — and Keisuke Honda probing for an opening.
Colombia took the lead against the run of play when Adrian Ramos was upended by Yasuyuki Konna as he burst into the penalty area, earning the defender a booking.
Juan Cuadrado converted from the spot in the 17th minute to put Colombia 1-0 in front.
Japan, criticised for their toothless display against Greece in their previous match, pressed for an equaliser. Kagawa forced a smart save from David Ospina and Honda went close from a free-kick.
Their efforts were eventually rewarded when Shinji Okazaki scored with an impressive diving header from Honda’s teasing left-footed cross.
But Japan knew despite their efforts they were still dependent on the other match in Group C, in which Greece were playing Ivory Coast.
Pekerman brought on Carlos Carbonero and James Rodriguez to replace Cuadrado and Juan Quintero at the start of the second half.
Monaco forward Rodriguez, who has shone in Brazil in the absence of his club team-mate Radamel Falcao, immediately looked dangerous and after 10 minutes helped Martinez fire Colombia in front.
As the game became stretched, Kagawa and Honda tried their luck from distance and Yoshito Okubo blazed over from close range.
News filtered through that Ivory Coast had equalised against Greece, making Japan’s task even harder but still they pressed for their own breakthrough, with Zaccheroni making changes in the search for a goal.
But with just eight minutes to go of normal time Martinez kept his composure in the box after a rapid break, firing past Eiji Kawashima for his second goal.
To roars from the Colombian fans Pekerman brought on veteran goalkeeper Mondragon, who last appeared at the finals 16 years ago.
He surpassed Cameroon’s Milla, who played at 42 years and 39 days, but Mondragon is now set to hang up his gloves.
His night was spoiled when Rodriguez burst into the box with seconds to go, producing a deft left-footed chip over the goalkeeper to seal an emphatic win.
Colombia, ranked eighth by FIFA, are making their first appearance in the World Cup finals since 1998. Their last-16 showing in Italy in 1990 was the only other time they have made it out of the group stage.