BASEL, Switzerland (AP) Rafael Nadal was pushed to three sets again at the Swiss Indoors before beating Grigor Dimitrov 6-4, 4-6, 6-3 in the second round on Wednesday.

Third-seeded Nadal struggled past Lukas Rosol on Monday, and had his serve broken in each set by Dimitrov before lifting his career record to 7-0 against the 28th-ranked Bulgarian.

Second-seeded Stan Wawrinka's longer-standing problems on the indoor hard courts at Basel resurfaced Wednesday.

The French Open champion from Switzerland exited in the first round for the fourth straight year, beaten by Ivo Karlovic of Croatia 3-6, 7-6 (2), 6-4.

Karlovic fired 21 aces in rallying from a set and a service break down in the second.

Marin Cilic, the seventh-seeded Croatian, beat Marco Chiudinelli of Switzerland, 6-3, 7-6 (3) and could meet Nadal in the quarterfinals on Friday.

Cilic first plays Teymuraz Gabashvili of Russia, who beat Leonardo Mayer of Argentina, 7-5, 4-6, 6-4.

In another first round match, fourth-seeded Kevin Anderson of South Africa cruised to a 6-3, 6-2 win over Borna Coric of Croatia.

Jack Sock won an all-American first-round match against Denis Kudla, 6-4, 6-2, to set up another in the next round. Sock will play John Isner, his doubles partner this week, on Thursday.

David Goffin, the eighth-seeded Belgian, also advanced to the quarterfinals by beating Adrian Mannarino of France, 6-4, 6-3.

Goffin set up a potential repeat of last year's Basel final against six-time champion Roger Federer. The top-seeded home favorite meets Philipp Kohlschreiber of Germany in a second-round match on Thursday.