Federer, who was facing del Potro for the first time since 2013, never lost serve and improved to 15-1 this year.

He broke del Potro twice, once in each set, and that was all he needed.

“I feel like I earned it more,” said Federer, the 2005 and 2006 champion on Key Biscayne. “I was more the aggressor. It was more my racket, and I like it that way.”

The first break put him up 5-3 in the first set, and the fourth-seeded Federer then fought off four break points in the ensuing game before closing out the set.

Another break for a 3-2 lead in the second set, not long after del Potro got his oft-problematic left wrist taped on a changeover, put Federer in control. Serving at 4-3, Federer faced a break point — Argentine fans serenaded del Potro beforehand with “Ole! Ole! Ole!” — but escaped when a serve return sailed long.

“I did my best,” the 29th-seeded del Potro said. “He played well in the break-point moments and I think that was the only difference in the match.”

It had the feel of a final, not a third-rounder on a Monday afternoon.

The stadium court, largely empty for the first two matches of the day, was filled — with huge roars greeting both players as they entered for warmups, many fans wearing hats or shirts with Federer’s “RF” logo, many others either donning Argentine soccer jerseys or carrying that nation’s flag in support of del Potro.

“It was really a great, nice atmosphere,” Federer said. “It was a lot of pleasure playing in nice weather, great opponent, great crowd. What else do you need?”

The last seven Federer-del Potro matches coming into this meeting all went the distance, with some classics — the 4 1/2-hour, three-setter at the 2012 Olympics at Wimbledon where Federer prevailed 19-17 in the third, Federer rallying from two sets down in the French Open quarterfinals that year, and del Potro winning the 2009 U.S. Open in five sets for his lone Grand Slam triumph.

Federer will now face 14th-seeded Roberto Bautista Agut, who needed three sets to top Sam Querrey of the U.S. Other third-round men’s winners included top-seeded Stan Wawrinka, eighth-seeded David Goffin, 10th-seeded Tomas Berdych, 12th-seeded Nick Kyrgios, 16th-seeded Alexander Zverev and unseeded Adrian Mannarino.