INDIAN WELLS, Calif. -- Rafael Nadal watched Juan Martin del Potro's last shot sail wide on his fourth match point and collapsed flat on his back. He wasn't down for long, bouncing back up to celebrate his third title in four tournaments since coming back from a knee injury.

Nadal rallied from a set and 1-3 down in the second to win 4-6, 6-3, 6-4 in the BNP Paribas Open final on Sunday, capping an amazing 1½-month run since his seven-month layoff ended in February.

"Seriously, it's impossible to have better comeback, no?" he said, smiling. "Happy for everything."

Nadal improved to a career-best 17-1 on the year, including 14 straight match wins. He's won three titles -- two on clay while runner-up in another on his favorite surface -- and now his first on hard courts since Tokyo in October 2010. He had lost six previous finals on the surface.

"That's makes emotional week for me," he said. "Very important victory for me, winning against the best players of the world on a surface that is good for them."

Maria Sharapova defeated Caroline Wozniacki 6-2, 6-2 to win her first title of the year in the women's final between two former top-ranked players.

Nadal won his 600th career match and will move to No. 4 in the rankings released Monday. He broke a tie with Roger Federer with his record 22nd career ATP Tour Masters 1000 title while earning $1 million for his third Indian Wells title.

"When you have one comeback like I'm having you remember all the low things, lower moments that you had during this seven months, doubts and all these things," he said. "The doubt when and where you will be able to be back on a tennis tournament is hard."

Nadal defeated Federer in straight sets in the quarterfinals, then took out Tomas Berdych in two sets in the semis. Against Del Potro, Nadal rolled to an early lead in a match that was marked by several momentum swings.

Nadal served three love games in the third set, capping his last one with a 123-mph ace that gave him a 5-3 lead.

Del Potro came from love-40 down and fought off three match points to hold at 5-4. But Nadal served out the match, dropping just one point in the final game of the 2½-hour match in the desert heat.

"I try to put the match in a little bit slower rhythm and wait for the right moments to go for the point and worked well," he said. "Del Potro is a fantastic player, so it's not easy to change the dynamic of the match like this."

Del Potro saved three break points to lead 1-0 in the third. Nadal held at love, taking three games in a row for a 3-1 lead that he never gave up.

After falling behind 3-0, Del Potro won eight of the next nine games to claim the opening set and take a 2-0 lead in the second.

"I was wrong in strategy for moments, something that for me is not usual, because normally I can have mistakes with the shots but with the tactics and the how I have to manage the points, how I have to play the points, normally I am right," Nadal said.

Del Potro went up 3-1 before Nadal won the final five games and the set 6-3 on a 105-mph ace that capped a love service game.

After Nadal picked himself up, he hugged Del Potro, then trotted behind the baseline to clasp hands with billionaire tournament owner Larry Ellison of Oracle Corp. before falling to his knees near the net and raising his arms in celebration. Nadal playfully took a bite out of the Baccarat crystal trophy.

Del Potro came up short in his bid to beat three Top-10 players in the same tournament for the second time in his career. He defeated No. 3 Andy Murray and No. 1 Novak Djokovic in three sets apiece in becoming the second Argentine since Guillermo Villas in 1977 to reach the final here.

Sharapova dictated from the opening game, when she broke Wozniacki at love with groundstrokes that had the Dane running from side to side. Sharapova faced just two break points on her serve in the nearly 1½-hour match.

"I always felt like I was always a foot ahead, especially with the breaks," she said. "I was able to serve well today, and that helped me."

It was Sharapova's second career title at Indian Wells, where she first won in 2006. Wozniacki won here in 2011. The women met in a final for the first time; their six other matches came in earlier rounds.

The Russian is projected to move one spot in the WTA Tour rankings to No. 2 on Monday, dropping Victoria Azarenka to third. Wozniacki will move up one spot to No. 9.

The victory, worth $1 million, gave Sharapova at least one title for 11 straight years dating to 2003.

Sharapova led 2-1 when Wozniacki brought her coach-dad Piotr out during a break. But she couldn't get untracked, and was broken again in the seventh game. Sharapova fought off two break points to take the first set in 38 minutes.

"She was putting pressure on me from the start. She was serving very well," Wozniacki said. "I felt like everything that she wanted to do today was going in. She was making very few errors, and if she did, then it was really at the times where it didn't really matter."

Sharapova broke to open the second set when Wozniacki double-faulted the game away. She converted her fourth break point on Wozniacki's backhand error to take a 5-3 lead. Sharapova was aggressive in her approach, using her forehand to push Wozniacki around and then coming in on short balls to easily put them away.