Ruben Neves' stoppage-time header broke the Republic of Ireland's hearts and handed Portugal a dramatic World Cup qualifying win in Lisbon after Cristiano Ronaldo was denied from the spot.
Neves rose brilliantly to steer Francisco Trincao's cross home and spare Ronaldo's blushes after the five-time Ballon d'Or winner's failure to convert from 12 yards.
Ronaldo was denied by Caoimhin Kelleher 15 minutes from time after Dara O'Shea was adjudged to have used his arm to block Trincao's effort.
After Kelleher's intervention, it looked as though the Republic of Ireland would take a hard-fought point back to Dublin, only for Neves to condemn them to another defeat after last month's shock reverse to Armenia in Yerevan.
Hungary's 2-0 win over Armenia in Group F's other fixture on Saturday means they sit second, five points behind leaders Portugal after three rounds of games. The Republic of Ireland are bottom, two points adrift of Armenia before a crucial meeting in Dublin on Tuesday.
Kelleher's penalty save to thwart Ronaldo was not enough to earn the Republic of Ireland a point
After a humbling night in Armenia last month, Republic of Ireland boss Heimir Hallgrimsson said his wounded players needed "almost a perfect game" to leave Lisbon with a positive result.
In an attempt to tighten up his defence, Hallgrimsson restored former captain Seamus Coleman to the line-up on his 37th birthday.
For much of the night, it yielded the desired response as the Republic of Ireland stoutly defended their box to frustrate Portugal.
At times against Hungary and Armenia, the Irish defence was prised apart with alarming ease, but they got through an enormous amount of work in Lisbon to intensify Portugal's frustrations and edge closer to taking a precious point.
The visitors' problem, however, was at the other end. While they poured everything into repelling Portugal's myriad threats, the attack mustered only two shots - neither on target - with frontman Evan Ferguson managing only 14 touches before he was replaced by Troy Parrott.
There were echoes of Faro in 2021, of course. Ronaldo had a penalty saved that night - by Gavin Bazunu - before popping up with two injury-time headers to deny the Republic of Ireland a famous win after John Egan had given Stephen Kenny's side the lead.
But this was not Ronaldo's night. In the first half, his fizzing left-footed drive hit a post, and he twice fired wide after the break before Kelleher saved his spot-kick with a foot after Dara O'Shea was penalised for handball.
Instead, it was Neves who headed the home side to a dramatic win, with the midfielder pointing to the sky in tribute to Diogo Jota in Portugal's first home game since the Liverpool star's death in July.
Portugal: Roberto Martinez's side will aim to make it four wins from four when they host Hungary in Lisbon on Tuesday (19:45 BST).
Republic of Ireland: Heimir Hallgrimsson's team must put aside their latest disappointment before welcoming Armenia to Dublin in a must-win game on Tuesday (19:45 BST).