Novak Djokovic beat top-ranked Rafael Nadal, 4-6, 6-3, 6-2, to win the BNP Paribas Open title on Sunday in Indian Wells, Calif., and remain undefeated this year.

Djokovic improved to 18-0, including titles at the Australian Open and in Dubai. He will move into the No. 2 spot when the ATP Tour rankings are released Monday, having bumped Roger Federer to third by beating him in the semifinals. Nadal will stay No. 1.

Top-ranked Caroline Wozniacki beat Marion Bartoli, 6-1, 2-6, 6-3, to win the women’s title. Wozniacki won her WTA Tour-leading 19th match of the year and her second title while appearing in her third consecutive final.