It was Federer who faltered at 11-11, double-faulting to hand Anderson a break point which he converted when the defending champion's tired forehand smacked the net.
Federer, who will face either Kevin Anderson or Gael Monfils in the last eight, needed just 16 minutes to wrap up the opening set against Mannarino. Anderson will take on the victor of Milos Raonic and American John Isner.
Kevin Anderson dethroned Roger Federer to reach his maiden Wimbledon semi-final after sealing a dramatic 13-11 deciding-set victory on Wednesday. Nadal has breezed through the draw so far and secured another straight-sets win yesterday, beating Czech Jiri Vesely 6-3, 6-3, 6-4. I think that's not fair.
After fighting back from match point and love-40 on his serve to take the third set, the South African broke Federer in the seventh game of the fourth set.
There was little sign of the drama which unfolded when Federer raced through the first set in 26 minutes.
"I think psychologically there's a huge difference for Anderson to play on Court One rather then Centre", the Swede, working as Eurosport's chief analyst, told Reuters.
Djokovic saved three break points in the fifth game of the third and made the Japanese star pay by breaking for 4-2 and an eventual two sets to one lead.
The 12-time major victor defeated Kei Nishikori 6-3, 3-6, 6-2, 6-2 on Centre Court to set up a clash on Friday with either world No 1 Rafael Nadal or Juan Martin del Potro.
He'll face either Milos Raonic or John Isner in their semi-final on Friday. "Now I feel horribly tired and just bad", Federer said.
He ended the match with a serve down the middle that.
He's been flashing some anger this fortnight and did so again in the second set, bouncing his racket off the turf after failing to capitalize on three break points at 1-all.
"I'm equally happy if I would have won all the matches in four sets".
Second seed Rafael Nadal of Spain was playing fifth seed Juan Martin del Potro of Argentina in the other last-eight clash after Novak Djokovic outlasted Kei Nishikori to be the first man to reach the semifinals.
Ramos then hit Djokovic with a time violation warning for taking too long to serve in the seventh game of the fourth set.
Operation To Rescue Boys Trapped In Thai Cave Resumes
On Sunday, officials decided they could no longer wait, saying conditions were "as flawless as they will be" for a rescue attempt. Two divers are helping each one make his way through very narrow tunnels that twist and turn, and filled with dark muddy water.
Jose Mourinho praises 'mature' Paul Pogba after France win
The experienced Croatian team is led by arguably the player of the tournament so far, Luka Modric. "We don't want to stop". One thing to keep an eye on in this match is the legs and how exhausted the players will be, especially with Croatia.
Britain's Prince Louis christened without Queen
When Prince Louis is baptised on Monday at the Chapel Royal, the Duke and Duchess of Cambridge are expected to keep to convention. Prince Louis has been christened during a 40-minute service at the Chapel Royal at St James' Palace in London .