Sydney, Australia, 11 January 2020 | Glenn Cullen (AAP)

Alex de Minaur finished just short of the biggest win of his burgeoning tennis career as Australia exited the ATP Cup with a semifinal loss to Spain.

World No.1 Rafael Nadal showed his class with a 4-6 7-5 6-1 win over the 20-year-old, after Nick Kyrgios lost to Roberto Bautista Agut 6-1 6-4

Spain will play the Novak Djokovic-led Serbia in Sunday night’s final. The Serbs beat Russia 3-0 in the first semifinal. 

Kyrgios’s defeat had left de Minaur needing an unlikely victory to push the match to a deciding doubles clash.

But adopting a similarly aggressive game plan to Belgium’s David Goffin, who downed Nadal on Friday night, de Minaur was outstanding, hitting winner after winner to put the 19-time Grand Slam champion on the back foot.

Breaking Nadal on his first service game, he held firm to take the opening set and went toe-to-toe with the Spaniard for much of the second.

After a break-point chance at 5-5 to serve for the match, things started to unravel for de Minaur who’d lost in straight sets to Nadal in their two previous encounters.

Nadal snatched the set with his only opportunity as part of a run of six-consecutive games to effectively seal the match.

The irrepressible de Minaur pinched a break back but it wasn’t enough as Nadal avoided losses in back-to-back matches for the first time since October 2016.

Earlier, the Kyrgios steam train was derailed by Bautista Agut.

It was an inauspicious start for Kyrgios who was broken for 0-2 and, when he handed Bautista Agut another after a serve volley on a second delivery, the set was as good as over.

The Australian knuckled down to hold at 0-5, ensuring he’d at least be serving first in the second set against the world No.10.

A tighter contest ensued early in the second but another turning point came for Kyrgios on serve at 2-2. Down a break point, the world No.29 thought he’d brought the game back to deuce with an ace, only to have a let called.

Two serves later, Kyrgios miscued a forehand long and was broken. He saved two match points in the ninth game but the ultra-consistent Bautista Agut served out the rubber.