Andy Murray produced a remarkable first-round fightback at the Australian Open but Roberto Bautista Agut consigned the three-time grand slam champion to defeat in what could be the final match of his career.
Murray was in tears when he announced last week he plans to retire after Wimbledon but admitted he may not be able to play beyond the first major of the year due to a hip injury.
The hobbling former world number one showed incredible spirit to rally from two sets down before Bautista Agut turned the tide in the decider to win an epic battle 6-4 6-4 6-7 (5-7) 6-7 (4-7) 6-2 on Melbourne Arena.
Bautista Agut – on a high after winning the Qatar Open – had never taken a set off Murray in their previous three meetings but looked set for a comfortable victory until the courageous Brit drew on his fighting qualities to come storming back.
An exhausted Murray understandably ran out of steam in the final set with the composed Bautista Agut still looking fresh as he finally ended what is expected to be the five-time runner-up's last appearance in the first major of the year, sealing a second-round meeting with John Millman.
The crowd rose after the pair fought it out for four hours and nine minutes on Monday, hitting 103 winners between them in an enthralling contest, with Murray falling short but bowing out with his head held high.
Murray was given a rousing ovation when he stepped out on court and started with a battling hold, but it was the Spaniard who claimed the only break in a tight first set.
Bautista Agut saved a break point before levelling at 4-4 and served out the set after Murray thudded a forehand into the net, having been worked from side to side in a previous point which the world number 24 won with an exquisite stop volley.
There were roars from the crowd after a couple of sublime forehand winners from Murray in Bautista Agut's first service game of the second set, but the Scot was left frustrated after failing to win two break points.
A prowling Bautista Agut charged in to retrieve a drop shot and swatted away an overhead volley as he went a break up and Murray was shaking his head after sending a backhand crashing into the net to gift his opponent a set point, which he won emphatically with an ace.
Bautista Agut continued to pounce on the Murray serve, returning with vigour as he went a break up at 2-1 in the third, but the former world number one showed his fighting spirit to hit straight back with a backhand down the line.
Murray pumped his fist and whipped the crowd into a frenzy following what was his first break and there was more of the same after he held for a 5-4 lead, having saved a break point.
The Olympic champion's celebrations were cut short when Bautista Agut successfully challenged on set point after his second serve was called out, but Murray exclaimed again after winning a tie-break to prolong the match courtesy of mini-breaks secured with a delicate backhand slice and a drive volley.
There were grimaces from Murray as he limped between points but continued to dig in, neither player giving the other a look-in on serve in a tense fourth set which always looked destined for another breaker.
It was the crowd favourite who held his nerve again to take it the distance, Bautista Agut netting a sliced return after winning three points in a row from 6-1 down.
Murray showed incredible defence to win a point in the second game of the final set, but he was a break down at 2-1 after thudding a backhand into the net.
Bautista Agut continued to work a tired Murray from side to side as he ran away with it, breaking again for a 4-1 lead and serving out the match to see the back of one of the best players in the modern era - who was given a standing ovation before his final service game.
Bautista Agut  bt Murray 6-4 6-4 6-7 (5-7) 6-7 (4-7) 6-2
Bautista Agut – 53/37
Murray – 50/51
Bautista Agut – 7/0
Murray – 19/2
BREAK POINTS WON
Bautista Agut – 5/10
FIRST SERVE PERCENTAGE
Bautista Agut – 73
Murray – 60
PERCENTAGE OF POINTS WON ON FIRST/SECOND SERVE
Bautista Agut – 83/60
Murray – 80/49
Bautista Agut – 164
Murray – 139