Spain will play host nation England in the quarterfinals at the Women’s European Championship after beating Denmark 1-0 to finish second in Group B on Saturday.
Denmark, losing finalist in the last continental showpiece in 2017, exits in the group stage.
A draw would have been enough for Spain to hold onto second place and it took until the 90th minute for Marta Cardona’s looping header from Olga Carmona’s cross to clinch the victory.
Spain will play England on Wednesday on the south coast in Brighton in its third consecutive last-eight appearance in the UEFA tournament.
Germany had already clinched top spot in Group B before beating Finland 3-0 in Saturday’s other game. There were goals from Sophia Kleinherne’s header, Alexandra Popp and Nicole Anyomi.
Germany, which won the last of its record eight European titles in 2013, will play Austria in the last eight on Thursday in Brentford.
After missing the last two European Championships through injury, Popp has three goals in three games at this tournament in England, the latest a header early in the second half from Kathrin-Julia Hendrich’s cross.
On Sunday in Group C, the Netherlands needs to avoid losing to last-placed Switzerland to extend its title defence into the quarterfinals.
Sweden, which is second in the group level on four points with the Netherlands, plays Portugal. The Swedes ranked second in the world, need only to draw to go through, while Portugal has to win and hope the Dutch avoid defeat to advance.