Valencia, Spain, 16 September 2024 | tennis.com.au/AAP

Australia will face either Italy or the United States when the Davis Cup Finals draw is determined on Thursday.

Australia had already qualified for the “Final 8” knockout stage of the competition by finishing in the top two of its group stage in Valencia after wins over France and Czech Republic.

Sunday’s tie against Spain – also undefeated in its first two ties – would determine the winner of the group, although both had already ensured their place in the Final 8 in Malaga in November.

> READ MORE: Australia qualifies for Davis Cup Finals

“We were ecstatic a couple of nights ago when we got told Spain had won and we were guaranteed to go through,” Australian captain Lleyton Hewitt said.

“We came here with one goal this week and that was to qualify for the finals, and we were able to do that. So really proud of the boys and the effort they’ve put in. They’ve done themselves proud and they’ve done the rest of the team proud, but they’ve [also] done their country proud.

“We’ll be ready for November.”

There was, in theory, only pride to play for in this Group B clash between Australia and Spain.

Yet it certainly didn’t feel that way as the home side, even without their rested superstar Carlos Alcaraz and cheered on by a wildly enthusiastic full-house in the Pabellon Fuente de San Luis, defied all the odds to battle to a win that ensured they topped the group.

Jordan Thompson had served for the match in the opening rubber, only to go down 2-6 6-2 7-6(3) to Pablo Carreno Busta, in what the Sydneysider described as an “incredibly frustrating” reverse.

Alexei Popyrin then levelled the tie with a fairly routine, crowd-silencing 6-4 6-4 victory over Pedro Martinez.

“The first match that I played I was a bit amped up on nerves and a bit emotional,” Popyrin told daviscup.com, referring to his loss earlier in the week to France’s Ugo Humbert.

“I tried to calm it down and feel the way I normally feel on court. I think towards the end I balanced it out and behaved the way I normally do on court.”

Popyrin’s victory set up a live doubles decider, with the Aussie pair of Matt Ebden and Max Purcell, who boast an outstanding Davis Cup record, taking on home duo of Marcel Granollers and Martinez.

With Martinez having to come back on court so soon after his defeat to Popyrin, things looked bleak for the Spaniards as they lost the opening set to Ebden and Purcell, the 2022 Wimbledon men’s doubles champions.

But inspired to new levels by the din at the indoor hardcourt venue, 38-year-old Granollers, the world’s No.1, led the pair to a remarkable 5-7 6-4 6-4 win.

2024 Davis Cup Finals – group stage

SPAIN d AUSTRALIA d 2-1

Pablo Carreno Busta (ESP) d Jordan Thompson (AUS) 2-6 6-2 7-6(3)
Alexei Popyrin (AUS) d Pedro Martinez (ESP) 6-4 6-4
Marcel Granollers/Pedro Martinez (ESP) d Matt Ebden/Max Purcell (AUS) 5-7 6-4 6-4

Find your way to play: Visit play.tennis.com.au to get out on court and have some fun!