Juan Martin del Potro brought world number one Novak Djokovic's 22-match winning run to an end with a stunning victory at the BNP Paribas Open.
The Argentine seventh seed won a superb match 4-6 6-4 6-4 to set up a final against Rafael Nadal in Indian Wells.
It was Djokovic's first defeat on tour since he lost to Sam Querrey at the Paris Masters in October.
Nadal reached the final of his first hard-court tournament in a year with a 6-4 7-5 win over Tomas Berdych.
But he will not face the opponent he might have anticipated after Djokovic succumbed to the same problem that had been the previous day - namely the fierce hitting of seventh seed Del Potro.
The 2009 US Open champion did not drop serve once in three sets against Murray, but the unerring accuracy and court coverage of top seed Djokovic proved too much in the early stages on Saturday.
Del Potro gamely saw off six break points in the first 10 games before the pressure finally told and he framed one of those huge forehand swings, giving the set to the Serb.
But just as he had done against Murray in the quarter-finals, Del Potro raised his game as the match progressed and began to dominate Djokovic with a combination of bludgeoning forehands and measured backhand slices.
With the afternoon temperature soaring in the desert, a bewildered Djokovic was broken three times to lose only his second set of the week.
And the Serb's unbeaten run was under real threat in the decider when Del Potro came roaring back from 0-3, earning two more break points at 3-3 and converting again at 4-4 when Djokovic simply could hot handle the pace coming at him.
Del Potro had won the last six games against Murray, and when he cracked a huge ace out wide on match point he finished off Djokovic by taking six of the last seven games.
"I was so close to losing but I got lucky in very important moments, very important points when I made fantastic winners on my forehands," said Del Potro.
"It was my best match in this tournament, for sure."
Djokovic said: "It's OK. It happens in sport. I just didn't make it this time. I didn't deserve to win today.
"Whenever I had chances, second, third set, I threw them away with some unforced errors. My movement was poor, and I congratulate to my opponent."
In the first semi-final, Nadal, ranked fifth following his prolonged absence, was in fine form from the outset against Berdych, a man he had beaten in 12 of 15 previous meetings, including the 2010 Wimbledon final.
After taking the first set with a solitary break, the Spaniard looked in danger of being dragged into a three-set battle when Berdych moved 5-3 up in the second.
However, the Czech played a poor service game and then handed over another break at 5-5 with a woeful attempt at a smash.
Nadal took full advantage as he reeled off the last four games, fending off three break points with some fine serving in what proved to be the final game.
"It's very, very difficult to imagine something like this," he said afterwards. "But here we are today, and I'm very happy about all that happened in the last month, especially the last three weeks.
"I don't have nothing to lose after seven months. I did much more than I dreamed (possible)."
Del Potro added: "When you play the top guys, they are the favourites, but I will try to play just like today and then see if Rafa gives me a little chance to win."