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 José Corona 46'
for G. dos Santos 58'
for A. Guardado 78'
for O. Peralta 78'
for H. Herrera 85'
|I did not see Sissoko elbow - Pochettino|
|Fears for Iniesta as Barcelona captain goes off on stretcher|
|Howe thrilled with Bournemouth display|
|Arter: Sissoko elbow was an accident|
|Garcia claims he snubbed West Ham approach|
|Sampaoli different to Bielsa, says Simeone|
|Bournemouth 0 Tottenham 0: Cherries hold toothless Spurs|
|Lippi named China boss after Guangzhou cancel contract|
|Simeone expects title challenge from Sevilla|
|Special quality makes Messi better than Ronaldo - Tite|
|Zidane reassures Morata: This is a marathon|
|Ronaldo made himself - Ferguson|
|A-League Review: Victory and Roar get first wins|
|Blind hits back at Spalletti in Strootman row|
|Mourinho has not lost his magic, insists Mikel|
|Suarez open to Ajax return|
|Young: There is more to come from Pogba|
|Digne at home in Barcelona and ready to help win trophies|
|Defoe´s finishing is ´absurd´ - Bilic|
|Stekelenburg grounded despite penalty heroics|
|Thiago Silva can be our Pirlo - Juve CEO hints at move for PSG defender|
|Koscielny calls for ´tough´ Arsenal|
|Birthday boy Wenger: Result will determine celebrations|
|MLS fines Drogba for Impact snub|
|Klopp backs Sturridge to bounce back|
|Conte: Chelsea still scarred from last season|
|Giggs: United decline was not inevitable|
|Falcao nets as brilliant Monaco hit Montpellier for six|
|Guardiola pleads patience for injury ravaged Kompany|
|No hard feelings as Mourinho focuses on Chelsea task|
|Guardiola: I don´t want City to play like Barcelona|
|Valencia fans´ Alcacer anger normal - Luis Enrique|
|Neymar: Playing for Barca is easy now|
|EPFL terminates agreement with UEFA|
|Aguero keeps Argentina spot, Messi returns|
|Donnarumma eyes Milan captaincy|
|Napoli fans banned from Juve trip|
|Mertesacker hails ´hungry´ hat-trick hero Ozil|
|Suarez says Barcelona renewal talks ´really advanced´|
|Lack of European football can aid Liverpool´s title bid - Pulis|
|European breaks do not benefit Chelsea - Conte|
|Pardew backs Leicester to ´come through´ tough start|
|Pochettino one of ´the very best´ coaches, says Howe|
|Puel backs Manchester City for Premier League title|
|Abramovich and I were not friends - Mourinho|
|It was not mutual consent, I was sacked by Chelsea - Mourinho|
|Brazil recall Douglas Costa, Marcelo and Casemiro for Argentina clash|
|Luis Enrique: If Messi is at his best, nobody knows how to stop him|
|Ramos deserves more than he earns - Perez|
|Neymar renewal proves Barcelona team spirit, says Luis Enrique|
|Bravo mistakes will be on the front page - Guardiola|
|I would sign Modric as Scholes´ successor - Giggs|
|At last! Neymar signs new Barcelona contract|
|Ronaldo injury helped Portugal to Euro 2016 success, says Abidal|
|Ronaldo injury helped Portugal to Euro 2016 success, says Abidal|
|Rummenigge blasts Premier League clubs for ´kidnapping´|
|Prandelli awed by Messi but ´dreaming big´ against Barcelona|
|Guardiola fumes at Aguero rumours after Barcelona omission|
|Conte: Mourinho deserves maximum respect|
|Moses happy for Conte chance after Mourinho struggle|
|Garcia dreaming of glory with lowly Marseille|
|Dawson back as Phelan expects Hull reaction|
|Conte declares Terry fit to face Mourinho´s United|
|Pardew: Why would I leave Palace for England?|
|Montella wants San Siro to strike fear into Juventus|
|Guardiola criticism ´political´, says Del Bosque|
|Ancelotti ready to unleash rampant Robben once more|
|Chelsea in a good position - Mourinho|
|Tuchel heartened by Reus return|
|Allegri wary of AC Milan after Inter ´whack´|
|Koeman hopes for Barkley ´wake-up call´|
|Melbourne City 2 Perth Glory 3: Keogh hat-tricks decider thriller|
|Dybala delighted to stay at Juve after rejected offer|
|Hughes eager to test Hull fragility|
|Carrasco extends Atletico contract|
|Moyes: I am under pressure - just like Guardiola|
|Wenger talks up Arsenal´s title credentials|
|Fuchs signs new Leicester contract|
|Guardiola doesn´t communicate - Benatia|
|Magical Messi from another planet, says awestruck Digne|
|Wenger pleased to see Ozil on goal trail as talks continue|
|Evra hails old rival Suarez as ´the best number 9´|
|Ranieri: I feel like a hybrid car|
|Falcao returns for Monaco|
|De Bruyne defends Guardiola tactics|
|Del Bosque: I rejected €10m offer from China|
|CONCACAF Champions League Review: Pumas, Dallas reach QFs|
|Alli like ´wild horse´ - Pochettino|
|Nani hails ´special´ Messi|
|Serious knee injury sidelines Hull´s Odubajo for six months|
|Mkhitaryan edging closer to comeback - Mourinho|
|Klopp: United game good prep for West Brom|
|Pogba praises Rooney after resounding win|
|Under-fire De Boer driven by reaching knockout stages|
|Pogba no longer Premier League´s ´worst´ player, mocks Mourinho|
|Austria Vienna spoil Totti milestone|
|Manchester United 4 Fenerbahce 1: Van Persie nets on return as Pogba stars|
|Puel rues unfortunate Inter defeat|
|Inter 1 Southampton 0: Candreva seals fortunate win for Inter|
|Buffon rules out club management after retirement|
|Mazzarri ´very happy´ about Holebas-Capoue row|
|Non-European city could host Champions League final - UEFA|
|Bradley calls for players to reconnect with fans|
|Pochettino lauds ´fantastic´ Howe|
|Frankfurt´s Russ eyeing return after tumour disease all-clear|
|Karanka insists Middlesbrough will not sit back against Arsenal|
|Atletico Madrid cannot sign players in January after FIFA deal|
|Koeman calls for greater Lukaku support|
|Suarez: Two goals at the Bernabeu were my best|
|Pochettino delivers mixed news on injury front|
|Karius has Klopp´s confidence|
|Suarez hopes to finish his career at Barcelona|
|Burnley suffer Defour injury blow|
|Marseille confirm Garcia appointment|
|No concerns for Ranieri as Vardy, Morgan and King miss training|
|Tony Pulis is Tony Pulis - Klopp not expecting surprises from West Brom|
|Garcia´s Roma contract terminated amid Marseille reports|
|Injured Pique ruled out for three weeks|
|Moyes the builder will fix Sunderland, says chief exec Bain|
|Walcott impressed by the ´new, aggressive´ Ozil|
|Bilic eyes Ayew injury boost|
|Bonaventura on Icardi saga: I´ll wait until I´ve won something before writing a book!|
|Van Persie: I may still be at Man Utd if Ferguson was in charge|
|Emery wants more from PSG despite victory|
|Muller: Bayern enjoyed PSV rout|
|Barcelona lose Alba and Pique to injury|
|Nolito: Messi made the difference|
|CONCACAF Champions League Review: Pachuca edge through, Timbers out|
|Ozil has ´taste´ for goals - Wenger|
|Renard, Morocco prepared for AFCON test|
|Guardiola: Barca loss not my worst|
|Luis Enrique hails ´decisive´ Messi|
|Pulisic, Green & Morris´ youth movement delight USMNT legend Jones|
|Clinical Barca point the way for Sterling and City|
|Sarri: Napoli making life hard for ourselves|
|That´s life for goalkeepers - Ter Stegen on Bravo woe|
|Schubert delighted with mature Gladbach display|
|Gunes not getting carried away after Besiktas upset Napoli|
|Lucas praises PSG response to stuttering start|
|Luis Enrique happy to rule in game of errors|
|Vitoria: Benfica face three more finals|