Murray came back from two sets down for the first time in his career
Andy Murray produced a stunning fightback from two sets down to beat Richard Gasquet, thrilling a packed Centre Court in the gathering gloom.
The Briton looked down and out when Gasquet served for the match in the third set but he recovered for a superb 5-7 3-6 7-6 (7-3) 6-2 6-4 victory.
And there is little doubt now that Murray has sealed his place in the Wimbledon crowd's affections.
The Scot goes on to face Rafael Nadal in Wednesday's quarter-finals.
"The light was tough at the end and I wanted to try to finish the match," Murray told BBC Sport after an epic contest which finished at 2129 BST.
"That was the best moment I've ever had on a tennis court. To come back from two sets to love and win it is an awesome feeling. The crowd got behind me just when I needed it and to have them behind me was a privilege."
Murray went into the fourth-round encounter having lost both previous matches against Gasquet, but buoyed by winning his opening three matches for the loss of just one set.
Gasquet, 22, gradually wrestled control of the first set from Murray, missing two break points in game eight before making the vital breakthrough in an extraordinary game at 6-5.
Murray saved two set points from 15-40 with an ace and a running backhand, a third with a similar shot after a dramatic rally, and a fourth with a big serve and sharp volley.
The Briton could not stem the tide forever, though, and the pressure told when, facing a fifth break point in the game, he pushed a drop volley into the tram lines.
Interview: Andy Murray
That took the wind out of his sails, deflated the crowd and gave the sometimes fragile Gasquet a huge confidence boost.
In the second game of the second set, Murray's love of the drop shot reared its head, two poor efforts letting Gasquet back into the game before the Scot double faulted.
Gasquet was now in the mood to capitalise, driving Murray back with a thumping forehand and punching away a forehand volley to break.
There was half a chance for Murray as Gasquet struggled to serve out the set, missing his first two set points on serve at 5-3, but the Briton could not capitalise and picked up a warning for an audible obscenity as the set slipped away.
Gasquet was well and truly in the groove now, his peerless backhand the highlight as the winners began to flow and four break points came and went at 2-2 in the third.
I had to keep fighting, he was completely outplaying me
The Frenchman missed another two break points at 4-3 before taking the third with a sweeping cross-court backhand winner, but the Centre Court came alive when Gasquet's notoriously suspect nerve failed him and he could not serve out the match.
After two lengthy games it came to a tie-break and Murray surged into a 4-0 lead, taking it with an incredible backhand winner from way outside the tram lines that had the 15,000 spectators on their feet.
For the first time this year there were chants of "Murray, Murray!" around Centre Court and at last the momentum was with the home player.
He raced through the fourth set in a little over 20 minutes with a blistering display and, after Gasquet was booed for taking a comfort break at the changeover, Murray broke at the start of the final set.
With the time approaching 2100 BST, a visibly shaken Gasquet missed a break-back chance in the second game and began questioning the umpire about the light.
The officials were not about to step in, though, and Murray eventually completed his first ever comeback from two sets down in three hours 57 minutes, taking his second match point with the pulsating Centre Court shrouded in darkness.
"I think he got a bit nervous towards the end of third set," added Murray.
"I had to keep fighting, he was completely outplaying me and once I won that third set his head went down and I kind of ran away with it."
Murray has a 0-3 record against the in-form Nadal but is optimistic that he can trouble the world number two on Wednesday.
"I'm definitely a better player than I was before and fitter," he said. "If I play like that again there's no reason I can't win."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.