Lleyton Hewitt hailed a mighty Australian effort as his team reached the Davis Cup final with a stunning win against Croatia in Malaga.

Max Purcell and Jordan Thompson beat the Olympic champion pair of Nikola Mektic and Mate Pavic in the deciding doubles to earn a 2-1 team victory and set up a showdown on Sunday against Canada or Italy.

Borna Coric got the better of Thanasi Kokkinakis in the first rubber on Friday, earning a 6-4 6-3 victory to put Croatia in the driving seat.

After a shock title success at the Cincinnati Masters in August, Coric was looking to end his year on another huge career high.

However, Marin Cilic could not seal the deal for Croatia as he slumped 6-2 6-2 to Alex de Minaur in the surprisingly one-sided tussle that followed.

De Minaur broke the Cilic serve four times and held his own throughout, typically with plenty of comfort, as he took down the 2014 US Open champion.

That meant the contest came down to the doubles, and Purcell and Thompson held their nerve in a gargantuan battle with Mektic and Pavic, coming from behind to score a 6-7 (3-7) 7-5 6-4 victory.

"I couldn't be prouder of the whole team," team captain Hewitt said, quoted on Tennis Australia's website.

"We knew we were the underdogs coming into this today and we like being in that position. It's a place I really enjoyed as a player and also as a captain."

Hewitt was a star of the team when Australia last won the Davis Cup or even made the final, all the way back in 2003. That was the country's 28th triumph in the competition, and now they have a chance to go after number 29.

"To put us in the final, that feeling, I can't describe it," said Thompson.

Canada face Italy on Saturday in the second semi-final.