In the end, only one achieved their aim, Portugal easing through to the semi-finals of the Confederations Cup while New Zealand's wait for a win at this tournament stretched to a 12th match.
Andre Silva added a third on 80 minutes before Nani completed the rout in stoppage time to ensure Portugal finished above Mexico on goal difference.
A second Portugal goal arrived four minutes later.
New Zealand's concluding game of the tournament taking place in St Petersburg this evening did not stop All Whites striker Chris Wood enjoying a victory for his country's rugby union heroes over the British and Irish Lions in the first Test.
Ronaldo rattled the crossbar before Ipswich defender Tommy Smith bundled over Danilo Pereira following a corner and the Real Madrid forward scored the resulting penalty.
Bernardo Silva added a second on the stroke of half-time and from there it looked as though the result was beyond doubt, with Andre Silva and Nani adding further to the scoreline.
Russian Federation goalkeeper Igor Akinfeev misread a long clearance and was helpless on the edge of his penalty area as a bouncing header by Hirving Lozano floated past him in the 52nd minute.More news: SpaceX Chalks Up Another Launch, Landing: One More This Weekend
Just as they did in the 2-2 draw with Portugal and subsequent victory over New Zealand, Mexico made a slow start and again fell behind.
Portugal's Cristiano Ronaldo, right, scores his side's first goal on a penalty during the Confederations Cup, Group A soccer match between New Zealand and Portugal, at the St. Petersburg Stadium, Russia, Saturday, June 24, 2.
That miss mattered little, however, as Andre Silva got their third 10 minutes from time by darting into the penalty area and tucking a clever finish past Marinovic after a fine run.
Russian Federation broke the deadlock in the 25th minute through Alexander Samedov but Nestor Araujo headed Mexico level five minutes later.
Mexico defender Nestor Araujo equalised in the 30th minute with a looping header.
Igor Smolnikov had Russia's best chance to level, smashing over from close range, but the hosts could not produce a comeback and will not participate in the semi-finals, with Mexico progressing alongside Portugal from Group A.
Hector Moreno then appeared to give Mexico an insurance goal in the 61st minute, but it was disallowed when the video assistant referee ruled he was offside.
Mexico star Javier "Chicharito" Hernandez trained separately from his teammates on Monday because of muscle fatigue, the latest concern for a Mexican team that has been struck by injuries at the Confederations Cup.