The fourth-seeded Federer needed less than an hour to win his first match on clay since 2016 and reach the third round in the Spanish capital. "It feels good to be back on the clay," Federer said. "I enjoyed it. Some of these rallies, where you get pushed to the side, you slide. You can play in a different manner than you do on the hard courts or the grass."
The 37-year-old Federer skipped the clay season the last two years to make sure he was fit for the rest of the year. The 20-time Grand Slam champion is preparing to make his first French Open appearance since 2015. He has won two hard-court titles this season, in Dubai and Miami. He is a three-time winner in Madrid, with his last title in 2012.
The fourth-seeded Swiss converted his three break points and didn't concede any to the 39th-ranked Gasquet at the "Magic Box" center court. Gasquet was playing in his first tournament after enduring a going injury early in the year.
"I think Richard was also maybe a little bit hurt from his match yesterday, so it was nice seeing him back after so many months being away from the tour with injury," Federer said. "I think for both of us it was a special match being back here in Madrid."
Earlier, top-ranked Novak Djokovic started with a 6-4, 6-2 win over Taylor Fritz. He broke the American's serve once in the first set and twice in the second, conceding only one break opportunity. The top-seeded Serb had seven aces and lost only two service points in the second set.
"I don't think he was playing at his best today," Djokovic said. "But I think it was a solid opening match for me in the tournament." Djokovic is seeking his second title of the year, and third overall in Madrid. He began the year by winning the Australian Open.
David Ferrer extended his career with a 6-4, 4-6, 6-4 win over Roberto Bautista Agut, setting up a second-round meeting with defending champion Alexander Zverev. The 37-year-old Ferrer is retiring after the tournament.
"I want to be with my family and try to enjoy as much as possible the time that I have to play in this center court," the Spaniard said. "And tomorrow I have another opportunity and I'll go out there to try to enjoy every single feeling that I might experience out there."
Stan Wawrinka ended a three-match losing streak in Madrid by defeating Pierre-Hugues Herbert 6-2, 6-3. "I felt good. It was a great match, a first great match," Wawrinka said. "I have been playing good on the practice court, feeling really good, so it was important to start well today and I'm happy with the first match."
Brazil Open champion Guido Pella upset 12th-seeded Daniil Medvedev 6-2, 1-6, 6-3, while Fabio Fognini beat Kyle Edmund 6-4, 6-3. On the women's side, top-ranked Naomi Osaka defeated Sara Sorribes Tormo 7-6 (5), 3-6, 6-0 in the second round.
"I feel like in the first set, I got a bit lucky there," Osaka said. "In the third set, I just, like, went zombie mode and then just thought of everything that I had to do to win and not necessarily the outcome."
Third-seeded Simona Halep defeated Johanna Konta 7-5, 6-1, while Caroline Garcia got past Sorana Cirstea 6-4, 3-6, 6-1. Fourth-seeded Angelique Kerber withdrew ahead of her second-round match against Petra Martic because of a right ankle injury.
Tales Azzoni on Twitter: http://twitter.com/tazzoni
More AP tennis coverage: https://apnews.com/apf-Tennis and https://twitter.com/AP_Sports