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'
|Perth Glory 2 Newcastle Jets 1: Maclaren double downs the Jets|
|Alcacer keen to commit long-term future to Valencia|
|Mourinho delighted with Drogba form|
|Bielsa plays down Gignac and Djedje dispute|
|Benitez calls for focus to be on football|
|Jardim: Monaco are not clinical enough|
|Keshi returns for Nigeria|
|Draxler injury ´a real blow´ for Schalke|
|Late goals inspiring Liverpool - Lallana|
|Sandro convinced QPR can stay up|
|Benfica 1 Rio Ave 0: Talisca stunner wins it for champions|
|Deportivo La Coruna 1 Getafe 2: Lafita returns to haunt hosts|
|Norwich go joint top, Accrington defeat Morecambe|
|St Johnstone 2 Motherwell 1: O´Halloran double secures win|
|Monaco 1 Reims 1: Moukandjo denies former club|
|Schalke 1 Augsburg 0: Draxler limps off as Di Matteo´s side triumph|
|J.League Preview: Gamba out to close on Urawa|
|CSL Preview: Guangzhou, Beijing in final-day fight|
|MLS Preview: Conference semi-finals get under way|
|Rabiot pens new PSG deal|
|Serie A Preview: Benitez eager for Napoli to seize Roma opportunity|
|Manchester City v Manchester United: Hart calls on hosts to step up|
|UEFA sanctions Romania and Hungary|
|Suspect charged with Meyiwa murder|
|Ferdinand laments ´ludicrous´ ban|
|Aston Villa v Tottenham: Lambert longs for elusive goal|
|Milan v Palermo: Menez eager to get back to winning ways|
|Simeone warns against complacency versus Cordoba|
|Hughes will ´not stand´ for Shawcross treatment|
|Zidane ban suspended|
|Falcao out of Manchester derby|
|K. League Preview: Championship, relegation sections begin|
|Sunderland receive Fletcher fitness boost|
|Caparros rubbishes newspaper comments ahead of Real clash|
|Guardiola hoping for Robben return|
|Ajax take A-League youngster on trial|
|Khedira has role to play - Ancelotti|
|Luis Enrique prepared for ´special´ fixture|
|Garcia paying no attention to table|
|Liga MX Preview: Queretaro eye play-off spots as derby unfolds|
|Silva set for four-week absence|
|Costa available for Chelsea|
|Mazzarri focused on performance|
|Away form a disaster - Allegri|
|Redknapp carefully managing Zamora|
|Hutton ruled out for Villa|
|ES Setif v AS Vita Club: Algerians aiming to prove doubters wrong|
|Cavani unsure over Paris Saint-Germain future|
|Melbourne City 1 Adelaide United 2: Villa bows out with defeat|
|Robertson returns for Hull|
|Di Matteo calls the shots - Heldt|
|Reveillere counting on European experience|
|Cheyrou leaves Marseille|
|Allardyce considers mid-season break|
|Cavani working to prove critics wrong|
|Walcott not ready to start, Wilshere ruled out against Burnley|
|Vermes refuses to play blame game|
|Eto´o on course to trigger Everton extension|
|Pellegrini facing sack - Marsh|
|Guidetti must pick Celtic - Deila|
|Zubizarreta unconcerned by Barcelona´s squad age|
|Costa Rican Primera Division Review: Alajuelense preserve lead|
|Al Hilal v Western Sydney Wanderers: A clash of styles to decide Asian champions|
|Liverpool exit possible - Gerrard|
|Pioli pleased with Lazio display|
|Copa Sudamericana Review: Emelec strike back at Sao Paulo|
|New York Red Bulls 2 Sporting Kansas City 1: Late winner denies reigning MLS champions|
|Robson: United talented as City|
|Verona 1 Lazio 1: Toni on the spot to earn a point|
|Varela returns to West Brom training|
|MLS announce new franchise Los Angeles FC|
|Newcastle United v Liverpool: Pardew vows to attack|
|UEFA sanction Slovan Bratislava and Sparta Prague|
|Pardew credits Hull fightback for upturn in form|
|Stoke City v West Ham: Allardyce sweating on Sakho´s fitness|
|Jovetic hungry for City goals|
|Fernandez red card rescinded|
|Chelsea v QPR: Redknapp ready to face Premier League´s best|
|Everton v Swansea: Martinez hails in-form attackers|
|SFA ban Tonev for seven games|
|Leicester City v West Brom: Pearson backs hosts to end slump|
|Arsenal v Burnley: Walcott set to return against bottom side|
|Koeman backs Southampton to maintain impressive start|
|Klopp wary of Dresden Pokal upset|
|Empoli v Juventus: Bonucci calls for greater maturity|
|Monk to meet with referee boss Riley|
|Parma v Inter: Crunch time for struggling Donadoni|
|Uchida extends Schalke deal|
|Liverpool must build on Swansea win - Rodgers|
|Hull City v Southampton: Koeman not worried about tiredness|
|Destro may consider Roma future|
|Raul completes Cosmos move|
|Bolasie working to adapt game|
|Bayern Munich v Borussia Dortmund: Kehl demands raised games|
|Bodmer pens Nice extension|
|Forest agree Ince loan|
|Simeone expected Atleti exits|
|Clark targets great escape after getting Blackpool job|
|Sakho ´touch and go´ for Stoke trip - Allardyce|
|La Liga Preview: Barca look to bounce back, Sevilla face Bilbao test|
|Icardi slams Inter boo-boys|
|Granada v Real Madrid: Ancelotti´s expectant side in red-hot form|
|Lorient v Paris Saint-Germain: Champions aim to stay in touch|
|Bundesliga Preview: Dortmund aim to end form slump at Bayern|
|Redknapp unconcerned over Ferdinand conduct|
|Atletico Madrid v Cordoba: Godin reveals Atleti motivation|
|Ligue 1 Preview: Strugglers Guingamp and Bastia face off|
|Ribery plays down supporter incident|
|Barcelona v Celta Vigo: Suarez set for home debut|
|Martinez praises influential Eto´o|
|Hernandez determined to shine|
|Kane hoping for starting role|
|Bonucci: Pitch not to blame for Juve loss|
|Pardew hails returning Taylor|
|Spain hit back in Costa row|
|Allegri slams Juve for Genoa loss|
|Copa Sudamericana Review: River Plate, Atletico Nacional grab leads|
|FC Dallas 2 Vancouver Whitecaps 1: Late penalty sends hosts through|
|Venezuelan Primera Division Review: Trujillanos triumph at Zamora|
|Liga del Futbol Profesional Boliviano Review: Bolivar reclaim lead, San Jose bounce back|
|Garcia not interested in Juventus´ loss|
|Copa do Brasil Review: Flamengo blitz Mineiro late|
|Guardiola: Hamburg ´surprised´ Bayern|
|Independiente del Valle 4 Universidad Catolica 0: Sornoza scores stunner|
|Paraguayan Division Profesional Review: Nacional extend Rubio Nu´s winless run|
|Ancelotti retracts Blatter criticism|
|Eredivisie Preview: Feyenoord-PEC a championship six-pointer|
|DFB Pokal Review: Leverkusen edge through on penalties, Bayern march on|
|Allegri unhappy with Genoa pitch and late goal|
|Bonaventura reveals ´lucky´ lob|
|Buoyant Pardew bullish after Newcastle triumph|
|Coupe de la Ligue Review: Late goal eliminates Marseille, Metz edge Nice on penalties|
|Pellegrini has defensive concerns|