Novak Djokovic and Rafael Nadal maintained their perfect records at the ATP Cup, while Argentina, Canada and Belgium all booked their spots in the quarter-finals.

Serbia had already qualified prior to their 2-1 victory over Chile in Brisbane, where Djokovic defeated Cristian Garin 6-3 6-3 to make it three singles victories and one doubles win so far.

Spain finished the group stage with a perfect 9-0 record after beating previously unbeaten Japan in Perth.

Nadal came out on top of an excellent tussle with Yoshihito Nishioka 7-6 (7-4) 6-4, twice recovering from a break down in the opening set, and then teamed up with Pablo Carreno Busta to win the doubles.

Serbia and Spain cannot meet until the final so the prospect of a first clash of the season between Nadal and Djokovic must wait.

All the action now moves to Sydney, where Serbia will face Canada in the last eight, while Spain play Belgium.

Both those teams qualified as best runners-up after the remaining ties were completed on Wednesday.

France and Croatia also had chances to go through but neither could take them.

France needed to beat South Africa 3-0, but lost 2-1 despite captain Gilles Simon stepping in to defeat Lloyd Harris in the opening match.

Benoit Paire looked poised to follow suit against Kevin Anderson but, as has happened too often in the Frenchman's career, he was unable to make it across the line, failing to serve out the match in both the second and third sets and seeing a match point go begging in a 2-6 7-6 (7-1) 7-6 (7-5) loss.

One of the three rubbers against Argentina would have been enough for Croatia but, after defeats for Marin Cilic and Borna Coric in singles, Ivan Dodig and Nikola Mektic were beaten by Maximo Gonzalez and Andres Molteni on a deciding tiebreak in the doubles.

The victory secured top spot in Group E for Argentina, who will face Russia in the last eight.

Hubert Hurkacz completed a stunning tournament individually by beating Austria's world number four Dominic Thiem 6-3 6-4 7-6 (7-5) to help Poland to a 2-1 victory.

Georgia clinched their first win of the competition, defeating Uruguay 2-1, and there were bizarre scenes in the second rubber between Nikoloz Basilashvili and Pablo Cuevas.

After losing the first set, Cuevas was incensed to be given a warning for a lack of best effort. He threatened to walk off the court but was convinced to continue by Basilashvili.

Cuevas made his point to the umpire by exaggerating his efforts thereafter and won the second set comfortably, but it was Basilashvili who came through in the end, winning 6-4 1-6 6-4.