Andy Murray's US Open bid came to an end last night as he was beaten in four pulsating sets by South Africa's Kevin Anderson, bringing to an end a run of 18 consecutive grand slam quarter-finals.

The Scot produced a brave fightback as he won the third set and forced a tie-break in the fourth but the 6ft 8 in Anderson blitzed it 7-0 to clinch a shock 7-6, 6-3, 6-7, 7-6 victory and set up a clash with Stan Wawrinka in the last eight.

For Murray, it was hugely disappointing, ending his quest for a third grand slam title, but when the dust settles, he will admit that Anderson outplayed him with tennis perhaps even he didn't realise he was capable of himself.

"I'm a little lost for words," he said. "I honestly played one of the best matches of my life. To be in the quarter-finals for the first time, it feels amazing.

"Andy is such a fighter, such an amazing player but I think I served very well and I couldn't ask to play a better tie-break than that. I wish I could play every tie-break like that."

It is the first time in 16 attempts that Anderson has beaten a top-10 player in a grand slam and only the second time he's beaten Murray in seven meetings.

As he roared back into contention, Murray looked more like Jimmy Connors as he got the crowd on his side but Anderson held his nerve brilliantly and his all-round aggression won the day in the end.

Murray had warned that he had come into the US Open concerned that with the Davis Cup semi-final against Australia very much on his horizon, he might get a little flat at some stage.

That concern looked very real in the first set but the true reason he was struggling was the sheer brilliance of Anderson.

The South African went into the match 0-7 in grand slam quarter-final matches and 0-15 in clashes with top-10 players in the majors.

But not only was he serving down bombs, as he usually does, he was coming up with some stunning shots from all areas of the court, often at crucial times.

His net play, in particular, was stunning and he came up with big returns and huge groundstrokes on big points, saving three break points in the fourth game to keep his momentum.

Anderson was the aggressor throughout the opening set as it headed to a tiebreak and after each man snuffed out a mini break, the No 15 seed came up with a breath-taking half-volley at 5-5 to force set point and took it with a huge forehand into Murray's backhand corner.

Murray dropped serve in the second game of the second as Anderson raced to a 3-0 lead, an advantage which became 5-1 as he grabbed a second break with more huge hitting.

At Wimbledon this summer, Anderson took the first two sets against world No 1 Novak Djokovic before fading and losing in five sets.

And the situation began to get to him as he tightened up, allowing Murray to get one of the breaks back and at 5-4 down, he had a break point to get back on serve.

But Anderson held on, finishing off the set with another big ace, prompting an angry Murray to unleash an expletive-laden tirade at the change of ends.

His mood wasn't helped when Anderson took an extended bathroom break - "how long is reasonable," he asked umpire Jake Garner, when told breaks should be of "a reasonable length".

And when he dropped serve at the start of the third set, the match looked as good as over.

But with his back against the wall, Murray dug in, galvanising himself and getting an immediate break, his roar of delight really getting the packed crowd inside Louis Armstrong Stadium going.

Murray broke again to lead 3-1 as Anderson faltered but the South African regained his poise, breaking back and then holding serve throughout the rest of a tense set, thanks to several stunning points, from drop shots to running passes and deft volleys.

By now, Murray was pumped up to the point where he was celebrating every winner with a fist pump, many of them in the direction of a small group of fans who were urging him to get back into the match.

An early missed forehand from Anderson put Murray in front in the tie-break and he rode the momentum to take it 7-2, yelling "Fire it up" to the crowd and his support box.

The first three sets had taken 3 hours, 17 minutes - the same as the entire match against Mannarino - and Murray was beginning to look the stronger.

But the Scot had to save two break points at 1-2 to stay on serve in the fourth as Anderson continued to go for his shots.

The set was tight throughout but both men held serve without facing any more break points, Murray even finding time to high-five a fan at one stage.

Anderson was two points from victory when Murray served at 5-6, 30-30 but the third seed held on to force a third tie-break.

Murray dropped his first service point and Anderson made it 3-0 with a flashing forehand return, before a bit of luck with the net cord, an ace and two forehand errors handed Anderson the victory of his life.

Wawrinka ended the challenge of Donald Young, the American who had twice come from two sets down to reach the last 16, winning 6-4, 1-6, 6-3, 6-4.