Portugal made certain of their place in the finals as a Joao Moutinho goal was enough to see off Denmark 1-0 in Braga.
Having won all but one of their Group I matches, they were always favourites to make it to France and - after Nani had hit the bar for the hosts and Denmark's Nicklas Bendtner had seen an effort come back off a post - Moutinho struck after collecting a clearance.
The result means Denmark's own qualification hopes hang in the balance as Albania look to finish in second place.
Victory against bottom side Armenia on Sunday would be enough for the Albanians - who missed out on securing qualification alongside Portugal after losing at home to Serbia.
The reverse fixture last year was abandoned after a brawl which saw Serbia deducted three points but late goals from Aleksandar Kolarov and Adem Ljajic gave them a 2-0 win in Elbasan.
Romania needed a late Ovidiu Hoban equaliser to rescue a 1-1 draw at home to Finland and stay in pole position for the runner-up spot in Group F, after Joel Pohjanpalo had opened the scoring in Bucharest.
Northern Ireland won the group with a 3-1 stroll past Greece, but that second-placed spot is still up for grabs.
Hungary are a point adrift of Romania following an unconvincing 2-1 victory over the Faroe Islands - who took a shock lead through Roaldur Jakobsen before a Daniel Bode brace turned things around.
Georgia came out on top in Group D's dead rubber as they secured a comfortable 4-0 victory at home to Gibraltar, with a Mate Vatsadze brace adding to Tornike Okriashvili's penalty and a late Valeri Kazaishvili effort.