Spain advanced to the quarterfinals of the ATP Cup even before Rafael Nadal stepped on to the court Wednesday at the Perth Arena.

Spain, which won the Davis Cup in Madrid with a finals victory over Canada, stayed in the hunt for its second international team victory in seven weeks when Roberto Bautista Agut beat Japan's Go Soeda 6-2, 6-4.

More Images
Japan's Go Soeda plays against Spain's Roberto Bautista Agut during their match at the ATP Cup in Perth, Australia, Wednesday, Jan. 8, 2020. (AP PhotoTrevor Collens)

Spain advanced to the quarterfinals of the ATP Cup even before Rafael Nadal stepped on to the court Wednesday at the Perth Arena.

Japan's Go Soeda plays against Spain's Roberto Bautista Agut during their match at the ATP Cup in Perth, Australia, Wednesday, Jan. 8, 2020. (AP PhotoTrevor Collens)

In other early matches on the final day of group play, Serbia, which had already qualified for the quarterfinals, had a winning 2-0 lead over Chile in Group A. Dusan Lajovic beat Nicolas Jarry 6-2, 7-6 (3) before Novak Djokovic defeated Cristian Garin 6-3, 6-3.

Novak Djokovic of Serbia plays a shot during his match against Cristian Garin of Chile at the ATP Cup tennis tournament in Brisbane, Australia, Wednesday, Jan. 8, 2020. (AP PhotoTertius Pickard)

On Friday, Serbia takes on the yet-to-be determined second runner-up — likely Canada or Belgium — while Spain plays the first runner-up in the other quarterfinal.

Novak Djokovic of Serbia plays a shot during his match against Cristian Garin of Chile at the ATP Cup tennis tournament in Brisbane, Australia, Wednesday, Jan. 8, 2020. (AP PhotoTertius Pickard)

Novak Djokovic of Serbia plays a shot during his match against Cristian Garin of Chile at the ATP Cup tennis tournament in Brisbane, Australia, Wednesday, Jan. 8, 2020. (AP PhotoTertius Pickard)

Dusan Lajovic of Serbia plays a shot during his match against Nicolas Jarry of Chile at the ATP Cup tennis tournament in Brisbane, Australia, Wednesday, Jan. 8, 2020. (AP PhotoTertius Pickard)

Dusan Lajovic of Serbia plays a shot during his match against Nicolas Jarry of Chile at the ATP Cup tennis tournament in Brisbane, Australia, Wednesday, Jan. 8, 2020. (AP PhotoTertius Pickard)

Nicolas Jarry of Chile plays a shot during his match against Dusan Lajovic of Serbia at the ATP Cup tennis tournament in Brisbane, Australia, Wednesday, Jan. 8, 2020. (AP PhotoTertius Pickard)

Nicolas Jarry of Chile plays a shot during his match against Dusan Lajovic of Serbia at the ATP Cup tennis tournament in Brisbane, Australia, Wednesday, Jan. 8, 2020. (AP PhotoTertius Pickard)

Japan needed to beat Spain 3-0 in order for the Nadal-led team not to advance to the Final Eight in Sydney beginning Thursday. Nadal was scheduled to play the next singles match against Yoshihito Nishioka of Japan.

Japan's Go Soeda plays against Spain's Roberto Bautista Agut during their match at the ATP Cup in Perth, Australia, Wednesday, Jan. 8, 2020. (AP PhotoTrevor Collens)

Japan's Go Soeda plays against Spain's Roberto Bautista Agut during their match at the ATP Cup in Perth, Australia, Wednesday, Jan. 8, 2020. (AP PhotoTrevor Collens)

In other early matches on the final day of group play, Serbia, which had already qualified for the quarterfinals, had a winning 2-0 lead over Chile in Group A. Dusan Lajovic beat Nicolas Jarry 6-2, 7-6 (3) before Novak Djokovic defeated Cristian Garin 6-3, 6-3.

The six group winners and two best second-place finishers advance to the finals in Sydney.

In the quarterfinal lineup for Thursday at Ken Rosewall Arena in Sydney, Australia plays Britain followed by Russia taking on the Group E winner, which will be decided later Wednesday in Sydney. Croatia, 2-0, faces Argentina in the late match.

Japan's Go Soeda plays against Spain's Roberto Bautista Agut during their match at the ATP Cup in Perth, Australia, Wednesday, Jan. 8, 2020. (AP PhotoTrevor Collens)

Japan's Go Soeda plays against Spain's Roberto Bautista Agut during their match at the ATP Cup in Perth, Australia, Wednesday, Jan. 8, 2020. (AP PhotoTrevor Collens)

On Friday, Serbia takes on the yet-to-be determined second runner-up — likely Canada or Belgium — while Spain plays the first runner-up in the other quarterfinal.

More AP Tennis: https://www.apnews.com/apf-Tennis and https://twitter.com/AP_Sports

Novak Djokovic of Serbia plays a shot during his match against Cristian Garin of Chile at the ATP Cup tennis tournament in Brisbane, Australia, Wednesday, Jan. 8, 2020. (AP PhotoTertius Pickard)

Novak Djokovic of Serbia plays a shot during his match against Cristian Garin of Chile at the ATP Cup tennis tournament in Brisbane, Australia, Wednesday, Jan. 8, 2020. (AP PhotoTertius Pickard)

Novak Djokovic of Serbia plays a shot during his match against Cristian Garin of Chile at the ATP Cup tennis tournament in Brisbane, Australia, Wednesday, Jan. 8, 2020. (AP PhotoTertius Pickard)

Novak Djokovic of Serbia plays a shot during his match against Cristian Garin of Chile at the ATP Cup tennis tournament in Brisbane, Australia, Wednesday, Jan. 8, 2020. (AP PhotoTertius Pickard)

Dusan Lajovic of Serbia plays a shot during his match against Nicolas Jarry of Chile at the ATP Cup tennis tournament in Brisbane, Australia, Wednesday, Jan. 8, 2020. (AP PhotoTertius Pickard)

Dusan Lajovic of Serbia plays a shot during his match against Nicolas Jarry of Chile at the ATP Cup tennis tournament in Brisbane, Australia, Wednesday, Jan. 8, 2020. (AP PhotoTertius Pickard)

Nicolas Jarry of Chile plays a shot during his match against Dusan Lajovic of Serbia at the ATP Cup tennis tournament in Brisbane, Australia, Wednesday, Jan. 8, 2020. (AP PhotoTertius Pickard)

Nicolas Jarry of Chile plays a shot during his match against Dusan Lajovic of Serbia at the ATP Cup tennis tournament in Brisbane, Australia, Wednesday, Jan. 8, 2020. (AP PhotoTertius Pickard)