Rafael Nadal falls to the ground in celebration after winning the Madrid Open against Stanislas Wawrinka Sunday.

MADRID — In front of an adoring crowd and on his cherished clay surface, Rafael Nadal defeated Stanislas Wawrinka to win the Madrid Open on Sunday, securing his fifth title since returning in February from a knee injury.

Nadal’s 6-2, 6-4 victory was a one-sided exhibition of clay-court mastery, particularly in the first set, which Nadal won in half an hour. Nadal, of Spain, used heavy topspin to keep Wawrinka running far behind the baseline. When Wawrinka risked a net approach, he was usually beaten by Nadal’s fierce passing shots.

After being sidelined for seven months, Nadal has reached seven consecutive finals, winning five. He now has three Madrid titles, but “this victory is even more special considering how complicated this year has been,” Nadal said.

Wawrinka has long played in the shadow of his Swiss compatriot Roger Federer, but he has been one of the most impressive players this season. He arrived in Madrid after winning a clay tournament in Portugal a week ago. He lined up strong performances on his way to the final, leaping to 10th from 15th in the rankings.

Wawrinka acknowledged the superiority of Nadal’s game, but he also said he felt “out of juice” by the time he took the court against Nadal. Wawrinka’s grueling Madrid schedule included a quarterfinal victory over Jo-Wilfried Tsonga, 6-2, 6-7 (9), 6-4, that ended after 1 a.m.

“If you’re not completely there, then he’s killing you, like he did at the beginning of the match,” Wawrinka said at a news conference, referring to Nadal. “He was always dictating the points.”

In the second set, Wawrinka briefly managed to keep pace with Nadal and make better use of his one-fisted backhand, one of the best on the tour. At 3-3, however, he served two straight double faults, handing Nadal a decisive break. Wawrinka never had a break point of his own.

Earlier in the day, Serena Williams defended her No. 1 ranking and her 2012 Madrid title by coasting past Maria Sharapova in the women’s final.

Williams completed her 6-1, 6-4 victory in slightly more than 1 hour 15 minutes, then celebrated her 50th career singles title by performing a pirouette for the crowd.

If Sharapova had won, she would have passed Williams for the top ranking. Before Sunday, Sharapova had not dropped a set in the tournament, and she had won 25 straight matches on red clay.

But Williams has not lost to Sharapova since 2004. Sharapova’s game unraveled Sunday from the start, when she failed to hold serve as Williams took a 4-0 lead. Even in the fifth game, which Sharapova won, she had three double faults and sent two backhands well beyond the baseline, symbolic of an afternoon in which she rarely found any rhythm.

“Starting the match like that isn’t going to get me anywhere,” Sharapova said at a news conference. “A lot of things were slow; I wasn’t reacting well and not moving well.”

Asked to compare Williams with other top players she had faced in her career, Sharapova said, “She is certainly the strongest, physically the most powerful and the biggest hitter.”

Williams repeatedly outpaced Sharapova, sending some forehands down the line that Sharapova could only watch from a distance.

Williams later walked into her news conference wearing a red T-shirt that read, “Bestest Ever.”

“Every time I play, I really relish it more,” Williams said, smiling. “I feel like, honestly, Serena, when are you going to get tired? I don’t know.”

Until Sunday, Williams had not won a title on red clay since the 2002 French Open. Last year, the Madrid tournament organizers chose to use a blue clay that drew heavy criticism for being slippery. Williams said the decision to switch back to traditional clay was “a plus,” allowing for better preparation for the French Open, which starts in two weeks.

“It’s a little slower than it was last year and plays more like a true clay court,” Williams said.

Nadal, who was among the loudest critics of the blue clay, thanked the organizers for improving the play conditions and returning to a regular clay surface, on which he has now won 40 titles.