Miguel Veloso snatched a last-minute winner for Portugal in Albania as they moved to the brink of Euro 2016.
The defender headed in from 12 yards in injury-time to keep Portugal top of Group I with a 1-0 win.
They lead the table by three points ahead of Denmark as Fernando Santos' men closed in on a place in France next year.
Former Manchester United winger Nani hit the post for the visitors while Sokol Cikalleshi's deflected effort hit the bar in the second half for Albania, who are a point behind Denmark with a game in hand going into the final round of fixtures next month.
Portugal had the better of the first half but failed to find the breakthrough as Adelino Vieirinha, Miguel Danny and Ronaldo failed to find the net from distance.
And Nani was denied by the woodwork on 12 minutes when he stretched to meet the ball only to poke it onto the outside of the post.
Portugal's frustrations continued and Albania began the second half strongly as Taulant Xhaka and Cikalleshi tested the defence before Danny saw his shot saved by Albania keeper Etrit Berisha on the hour.
And with 15 minutes left Albania almost grabbed an opener when Cikalleshi controlled a bouncing ball on the edge of the box and his deflected half volley struck the crossbar.
But Portugal clinched victory in stoppage time when Veloso met Ricardo Quaresma's corner to head in a last-gasp winner.