Murray has tipped the precocious 18-year-old Spaniard as a future world number one but it was the veteran Scot who outlasted his opponent 5-7 6-3 6-2 in over three hours in the desert heat.
Alcaraz, who burst on to the scene by reaching the quarter-finals of this year’s US Open, initially looked awe-struck by the occasion as a string of unforced errors left him trailing 3-0 and 0-40 at the start of the match.
But from the verge of a double-break down he grew in confidence, rescuing the fourth game then breaking back for 3-4 when Murray, struggling to respond to his opponent’s increasing accuracy, double-faulted.
There looked like being a further twist in the topsy-turvy opener when a blunder by Alcaraz handed Murray a set point at 5-4, but the Spaniard recovered again with a big serve then broke Murray a second time before serving out.
Murray resorted to increasingly desperate measures to contain his opponent’s blistering ground-strokes at the start of the second, saving a break point before sealing the third game of the set with an audacious under-arm ace.
Murray saved two break points in surviving an 11-minute service game early in the second set and capitalised immediately, pressuring the Spaniard who netted with an uncharacteristically feeble backhand to fall 4-2 behind.
In a fiercely competitive affair, it was no surprise that Murray should be made to work to serve out the set, but he duly did so courtesy of consecutive unforced errors by the Spaniard, sending their clash into a decider.
Fears it may be the 34-year-old Scot who would fade first proved unfounded, as Murray broke again at the start of the third, then came out on top of another 10-minute service game to consolidate his advantage.
A double break effectively sealed a hugely significant win for Murray, whose flagging opponent required a medical time-out for a minor foot injury as he slid out of the tournament.