The second seed let slip an early 5-1 advantage before winning the first set, but he overcome a combative display from his opponent to record a 6-4 6-3 6-2 win.
Read below to see how the action unfolded on the Arthur Ashe Stadium court.
Hello, and welcome to Sports Mole's live coverage of the match between Roberto Bautista Agut and Roger Federer in the fourth round of the US Open.
After another baking hot day in New York, it has "cooled" down to 33C, but this match between the 17-time Grand Slam winner and the consistent Spaniard. This might not live up to the Monfils win over Dimitrov, but it's not bad for a Tuesday night's entertainment!
Federer has stormed through to the last 16, dropping just the one set to Marcel Granollers, while Bautista-Agut has breezed through his last two matches in straight sets after going the distance in the first round. This is new territory for the 26-year-old Spaniard, who was knocked out at the last 64 stage on his only other visit to Flushing Meadows.
This is the first meeting between the two players. Will that favour anyone? Probably not, but it gives the Spaniard a small window of opportunity to impose himself on the match. It will be the world number 19 to serve first.
Bautista Agut starts well with a easy conversion at the net, and he holds to 15 in impressive style with a big ace down the middle. That ought to settle him down on his first appearance on Arthur Ashe.
Bautista Agut is playing some good stuff, but after conceding the opening point, Federer hits back with some aggressive play at the net. Federer thinks he has the game won with an ace, but Bautista Agut successfully challenges before taking it to deuce. The Swiss comes through though, forcing his opponent into a couple of errors.
BREAK! Federer seems in a particularly aggressive mood tonight. He concedes the first point but he quickly brings up two break points with some huge shots inside the court. The break is sealed when Bautista Agut goes long with a forehand and the Swiss has the early advantage.
Nicely done by Bautista Agut, who executes his defensive lob to perfection to force the error but Federer looks superb right now and he registers his first ace on the way to 40-15. More sharp reactions at the net ensure that he comfortably takes the game.
BREAK! The Spaniard isn't being given the chance to settle by Federer and he soon finds himself 15-30 down. However, the world number 19 produces some inspired play from the back of the court that earns him game point. It's not enough to keep Federer off him, though, and after squandering three break-point chances, Federer takes the fourth after a blistering rally that saw both men produce their best tennis of the match.
A double fault from Federer gives Bautista Agut half a look at 15-15 but he dominates off his serve to rapidly reel off three more points.
More relentless front-foot tennis takes Federer two points away from the set, but to his credit, Bautista Agut doesn't give up the opener as an ace and huge forehand get him to game point. The Spaniard must save a set point, but he comes through in fine style, driving a forehand past Federer before out-doing him at the net.
BREAK! Bautista Agut continues his fine run of points passing winner and he makes it six successive points with a crushing forehand winner to bring up three break points. Federer saves the first two points, but he can't save a third as he slices long of the baseline.
This a turn up for the books. Bautista Agut is building up a head of steam, and after converting a volley at the net, he seals the game with a well-directed first serve. Federer must serve to try to win this first set.
SET! Normal service is finally resumed as Federer races into a 30-0 lead, but back comes Bautista Agut who twice sees his opponent go marginally wide of the mark. It's a temporary blip though, and two aces earn Federer the opening set. Bautista Agut is a live opponent in this, though.
It's a confident start to the second set from Bautista Agut, who sends down a variety of first serves to hold to 15.
It's equally efficient from Federer, who secures a love hold with a kicking second serve out wide. That hold should do him the world of good because there have been signs that he has lost a little bit of rhythm in the past 20 minutes.
BREAK! After the first two points are shared, a forehand from Bautista Agut clips the net and goes long, and it seems to be still on his mind as he dumps the same shot into the net on the next point. The Spaniard is frustrated, and he tamely concedes the break with a double fault.
All of a sudden, Federer looks like the player who began this match and he is all over the net to smash his way into a 30-0 lead. A first serve out wide secures three game points and the break is consolidated when Bautista Agut flicks wide.
It's so refreshing to see Federer play this kind of attacking tennis. Bautista Agut is matching him all the way but you always feel that the Swiss is in full control. He misses a chance for the double-break, but you get the feeling he wants this one over with as soon as possible.
While Federer looks sublime off the ground, he has thrown in the odd double fault, and two more leave Bautista Agut with a break point. However, it encourages Federer to come forward again, and he swiftly closes the door on the Spaniard.
It's an important game for Bautista Agut, who needs to keep scrapping away because he is getting the odd chance on Federer's serve. It's another game that sees the Spaniard having to save a break point, but he comes through when Federer drives a couple of baselines shot long.
A couple of aces down the middle get Federer to 40-15 before a solid first serve to Bautista Agut's backhand forces him to net.
SET! Bautista Agut is giving it everything from the baseline but Federer is firing back and it's enough for 0-30. The Swiss makes an unforced error on the next rally, but it's two set points to Federer after an exquisite defensive lob. It's taken at the first time of asking when Bautista Agut nets a volley and the Swiss is one set away from a last-eight encounter with Gael Monfils.
Federer wants this one done early but he has to fight harder than he would have liked to hold serve at the start of this set. At 15-30 down, he stops play to wrongly challenge a call and Bautista Agut has two chances to break. However, a combination of solid play from Federer and mistakes from the Spaniard allow the second seed to hold serve.
Bautista Agut has the crowd on their feet with two forehand winners at the net, and he is able to hold comfortably to 15. He may be facing a two-set deficit, but he's still looking a danger to Federer on occasions.
Maybe on more than the odd occasion? Bautista Agut has Federer in trouble at 0-30 but after the Spaniard marginally misses out on 0-40 by finding the top of the net with a forehand, Federer sweeps through the remainder of the game with relative ease.
BREAK! Federer produces his moment of the match with a blistering forehand winner that catches the line before a net cord diverts a Bautista Agut shot out for 0-30. Federer nets on the next point but the Spaniard can't deal with a lob from his opponent and he dumps a smash miles long of the baseline. It's two break points for Federer, and he takes it on the first opening when his opponent nets.
The spring is back in Federer's step and he makes light work out of moving to 40-15. Bautista Agut pegs him back to deuce, though, but after getting to break point, he can't go the pace with the Swiss and Federer is two games away from the quarter-finals.
This game is simply a must hold for Bautista Agut, and he makes a super job of staying competitive in the match with some timely first serves that force Federer onto the defensive.
Bautista Agut is furious with himself for missing a chance for 0-30 but his anger is eased when Federer nets for 15-30. It's not enough to effect the rhythm of the Swiss though, and he blasts his way to the game. When we return, Bautista Agut will try to remain in the match/
MATCH! Bautista Agut shows no signs of folding as he fires two forehand winners to the left of Federer but nerves begin to set in and a double fault hands Federer 30-30. The Spaniard gets a game point but fails to convert, and two points later, if the Swiss who is on the brink of the last eight, but he blasts a forehand long. A second opportunity arrives when the world number 19 just misses the line and victory is clinched by Federer when Bautista Agut nets. An excellent display from the second seed.
After a little under two hours, Roger Federer books a quarter-final showdown with Gael Monfils after a 6-4 6-3 6-2 triumph over Roberto Bautista Agut. The scoreline was a little harsh on the Spaniard - he created seven break-point chances against Federer and frequently pushed him in lengthy rallies - but it was a deserved win for the second seed and he will take plenty of confidence going into his match with Monfils.
That will be all from Sports Mole for this contest, but we hope to see you again tomorrow for the match between Novak Djokovic and Andy Murray. Goodbye for now.