A 93rd-minute header from Bruno Alves gave Portugal an unconvincing 1-0 win over Mexico on Friday.
The Fenerbahce defender found himself free at a late Joao Moutinho set-piece at the Gillette Stadium in Foxborough and headed past a helpless Guillermo Ochoa.
With Cristiano Ronaldo still missing due to injury, Paulo Bento's men had lacked a creative spark until the late winner.
Portugal, who were held to a 0-0 draw by Greece last time out, face the Republic of Ireland on Tuesday before their World Cup campaign begins against Germany on June 16.
As expected, Portugal were without key trio Ronaldo, Pepe and Raul Meireles in Massachusetts.
Miguel Herrera started with Manchester United striker Javier Hernandez on the bench, while Rafael Marquez – who had been under an injury cloud – returned to the centre of defence.
Mexico pressed high up the pitch early on, but Portugal created an opportunity in the 14th minute as Vieirinha's strike was kept out by Jose de Jesus Corona.
Portugal forward Eder had the best chance of the first half when he was played through, but Mexico scrambled the danger away with Corona swatting the ball away.
Eduardo was forced into a save in the Portugal goal soon after as he tipped away a goal-bound cross from the left.
Eder looked the most likely to score in an uninspiring first half and he had another chance six minutes before the break, only to put Joao Pereira's cross wide.
Bento's men almost took the lead in the 50th minute.
A Nani corner eventually fell to Fabio Coentrao in the area, but the Real Madrid defender's low strike was kept out by substitute goalkeeper Guillermo Ochoa at his near post.
Just five minutes later, Mexico almost found an unlikely opener from range.
Hector Herrera played a square pass to Andres Guardado, whose powerful 25-yard drive went inches wide.
Hernandez needed just three minutes to have an impact off the bench as he almost set up Hector Herrera a minute after the hour-mark.
The striker's cross to the back post from the left found the Porto man, who took a neat touch before forcing Eduardo into a strong save from an angle.
The lively Hector Herrera tried his luck from range in the 68th minute, and Eduardo was up to the task once more to deny him.
Hernandez set up substitute Alan Pulido for a glorious chance in the 89th minute.
Played in behind, Hernandez unselfishly squared for Pulido, but Eduardo was quick off his line to smother at the forward's feet in a one-on-one.
But there was to be late drama as slack marking saw Alves rise in the area to head in Moutinho's free-kick from the right.
Mexico had their moments ahead of their first World Cup clash against Cameroon on June 13, while Portugal have one more friendly to improve their attack.
|10||G. dos Santos|
|Coach: M. Herrera|
for J. Corona 46'
for G. dos Santos 58'
for A. Guardado 78'
for O. Peralta 78'
for H. Herrera 85'
|Bruce hopes for squad boost|
|Lambert slams ´nonsense´ fixture list|
|Redknapp looking for loan deals|
|Pearson welcomes Premier League pressure|
|Terry calls for ´quiet arrogance´ from Chelsea|
|Dyche baffled by Burnley´s ´strugglers´ tag|
|Irvine unaware of potential West Brom additions|
|Allardyce pleased with 2014 points haul|
|Torres set for return to Atletico Madrid on loan|
|Maiga earns Mali recall|
|Sunderland concern over Larsson and Bridcutt|
|Pochettino planning Tottenham transfer talks|
|Wenger confident of top-four finish|
|Hughes sweating on Bojan fitness|
|Hectic schedule caught up with United - Van Gaal|
|Capello: Wenger shunned Lopez advice|
|PSG aim for improvement in Morocco|
|Jones: United could have scored four|
|Mignolet: Getting dropped helped me|
|A-League Preview: No concerns for Finkler ahead of Victory blockbuster|
|Milan, Atletico working on Torres-Cerci swap|
|Garbutt: Crisis talk premature|
|Zurich pair key for Tunisia|
|Uchida ruled out of Asian Cup|
|Lemina rejects Gabon call-up|
|Toure a doubt for Sunderland clash|
|Millen ´ready´ to manage Palace|
|Carver urges Newcastle to kick on|
|Bellarabi extends Leverkusen deal|
|Wenger hails ´committed´ Arsenal|
|Diouf will be missed - Hughes|
|Millen elated at resolute Palace performance|
|Lambert: Big point for Villa|
|Martinez rues Cisse decision|
|Dyche delighted by Burnley character|
|Allardyce: Officials got it horribly wrong|
|Poyet rues dropped points at Villa|
|Bruce frustrated as dominant display yields no points|
|Pellegrini laments key turning points in Burnley setback|
|Newcastle United 3 Everton 2: Pardew´s men impress at St James´ Park|
|League One Review: Swindon climb into second, MK Dons suffer surprise defeat|
|Championship Review: Bournemouth go four points clear, Boro held|
|Koeman hails Southampton spirit|
|Inverness Caledonian Thistle 0 Aberdeen 1: Pawlett strikes sends McInnes´ men second|
|Mourinho fumes at ´campaign´ against Chelsea|
|Manchester City 2 Burnley 2: Barnes claims a point to deny champions|
|West Ham 1 Arsenal 2: Wenger´s men climb above hosts|
|Hull City 0 Leicester City 1: Mahrez fires Pearson´s men to victory|
|QPR 0 Crystal Palace 0: Millen makes solid start as temporary Palace boss|
|Aston Villa 0 Sunderland 0: Delph sees red in stalemate|
|Stoke 2 West Brom 0: Diouf brace secures back-to-back wins|
|Southampton 1 Chelsea 1: Mourinho´s men end 2014 on top|
|Van Gaal frustrated with wasteful finishing|
|Pochettino content with goalless draw|
|Tottenham 0 Manchester United 0: Honours even at White Hart Lane|
|Klose vows to fight for Lazio place|
|Hughton admits interest in Palace and Brighton roles|
|Injuries not behind retirement plans, says Rolfes|
|Podolski: Arsenal exit not a formality|
|Wellington Phoenix 1 Western Sydney Wanderers 0: Krishna wins it|
|Taylor wary of ´beast´ Lukaku|
|Al Habsi to lead Oman at Asian Cup|
|Lacazette will stay at Lyon - Aulas|
|Southampton like Atletico, says Alderweireld|
|World Cup held PSG back - Blanc|
|Everton facing ´pivotal´ moment - Martinez|
|Zamora urges QPR to tie down Austin|
|Badstuber, Alaba set for New Year return|
|Burgos: Atletico will get the best out of Torres|
|Chelsea to offer Terry new deal - Mourinho|
|Rodgers excited by Sterling development|
|Strinic close to finalising Napoli switch|
|Torres to join Milan on permanent deal|
|Scottish Premiership Review: Celtic held to shock draw, rivals fail to capitalise|
|Wenger sings Song´s praises|
|Pochettino calls for bravery|
|West Ham could lose Allardyce - Sullivan|
|League One Preview: Saunders takes charge for Colchester clash|
|Aguirre denies any involvement in La Liga match-fixing scandal|
|Mourinho impressed by Koeman´s Southampton|
|QPR v Crystal Palace: Millen recast in familiar role|
|West Ham v Arsenal: Allardyce eyes further home comfort|
|Elusive Coppa Italia on Juventus´ wish list - Marotta|
|Jones eyes swift response|
|Millen focused on QPR clash|
|League Two Preview: Shrewsbury, Wycombe and Burton vie for year-end top spot|
|Mancini not expecting big-money signings at Inter|
|Tottenham v Manchester United: Carrick expects tough return|
|Pearson eager to see Leicester resolve|
|Newcastle United v Everton: Martinez demands clinical touch|
|Liverpool v Swansea City: Rodgers backs returning Mignolet|
|Bayern can still improve - Sammer|
|Warnock sacked by Palace|
|Aston Villa v Sunderland: No club too big to go down, says Lambert|
|Hull City v Leicester City: Pearson vows to keep going|
|Stoke City v West Brom: Hughes targets elusive back-to-back wins|
|Rodgers dismisses Balotelli exit rumours|
|Modric will not rush Madrid return|
|Dyche pleased with Vokes return|
|Southampton v Chelsea: Koeman vows to go on the offensive|
|A-League Review: Six-goal Gosford thriller, Victory leave it late|
|Manchester City v Burnley: Pellegrini warns against complacency|
|Dortmund can fight on two fronts - Watzke|
|Sterling hails improved Liverpool belief|
|Rosicky eager to build on QPR winner|
|Wenger: ´We made it hard for ourselves´|
|Kane: Spurs eye top four|
|Di Maria in doubt for Spurs clash|