Carlos Alcaraz won the second singles rubber to secure Spain's Davis Cup victory over South Korea ©Getty Images

Spain qualified for the Davis Cup Tennis Finals as group winners after victory in their final match against South Korea in Valencia.

Needing a win to ensure they topped the group Spain won the tie at the Pavelló Municipal Font de Sant Lluís 3-0.

After Roberto Bautista-Agut overcame Hong Seong Chan 6-1, 6-3, world number one Carlos Alcaraz sealed victory in the tie by beating Soonwoo Kwon 6-4, 7-6.

Marcel Granollers and Pedro Martinez ensured a whitewash win by beating Nam Ji Sung and Song Min-Kyu 7-5, 3-6, 6-1.

The top three teams in Group B all finished with identical records of two wins and one defeat, with Serbia missing out and Canada going through, after the Canadians won five matches compared to their rivals four.

In Group A, hosts Italy finished unbeaten after beating Sweden 2-1 at Bologna’s Unipol Arena.

After singles wins for Italy’s Matteo Berrettini and Sweden’s Mikael Ymer the tie came down to the decisive doubles rubber.

Simone Bolelli and Fabio Fognini overcame Andre Goransson and Dragos Nicolae Madaras 7-6, 6-2, a result enough to send last year’s runners-up Croatia through as the second-placed team in the group.

In Group C, Germany and Australia, who had both ensured their passage through to the quarter-finals, met at the Am Rothenbaum in Hamburg, to decide group position.

The singles rubbers were shared with victories for Jan-Lennard Struff of Germany and Australia’s Thanasi Kokkinakis.

Kevin Krawietz and Tim Puetz won the decisive doubles rubber for Germany, overcoming Australians Matthew Ebden and Max Purcell 6-4, 6-4.

In Group D, two teams who were already eliminated, Britain and Kazakhstan, met at the Emirates Arena in Glasgow, Scotland to play for pride.

After the singles rubbers were shared, the decisive doubles proved a marathon encounter with Britain’s Joe Salisbury and Neal Skupski overcoming Alexander Bublik and Aleksandr Nedovyesov in three tiebreak sets, 7-6, 6-7, 7-6 to give Britain a 2-1 win.

The line-up for the quarter-finals, due to be held in Malaga, Spain, from November 22 to 24, has now been finalised.

Australia will take on Netherlands, last year’s runners-up Croatia take on Italy, Italy face the United States and Germany will meet Canada.

There will be a new name on the trophy this year, with holders the Russian Tennis Federation banning from competing due to the war in Ukraine.