Andy Murray beat Japan's Kei Nishikori in a gripping contest to secure victory for defending champions Great Britain in the Davis Cup first round.
The Scot won 7-5 7-6 (8-6) 3-6 4-6 6-3 after four hours and 54 minutes to give the hosts an unassailable 3-1 lead in the best-of-five tie in Birmingham.
Murray, 28, won three matches in three days in his first event back following the birth of his daughter Sophia.
Britain will play Serbia away in July's quarter-finals.
World number one Novak Djokovic took almost five hours to beat Mikhail Kukushkin 6-7 (6-8) 7-6 (7-3) 4-6 6-3 6-2 as Serbia levelled their tie with Kazakhstan at 2-2.
Viktor Troicki, the world number 23, then saw off Aleksandr Nedovyesov 6-2 6-3 6-4 in the deciding rubber.
Britain's victory ensured their place in the elite World Group in 2017.
'Man of steel'
"I am lost for words at this stage; he is a man of steel, isn't he?" captain Leon Smith said of Murray.
"What Andy managed to do was astonishing since he hasn't played since the Australian Open final."
Murray himself was keen to get back to his family, saying: "It's Kim's first Mother's Day, so it will be nice to get to see her this evening.
"I'll try to get back for bath time and to put her to sleep - the baby, not Kim."
Murray finds Davis Cup inspiration again
"The crowd helped for sure," Murray told BBC Sport. "Physically I struggled a little at the end of the third set and a little in fourth.
Murray's fierce determination hauled him through bouts of fatigue and frustration to claim the biggest scalp, at least in terms of rankings, of his Davis Cup career.
The world number two smashed his racquet and berated the umpire at times - but eventually got the better of a high-class opponent with some magnificent tennis.
Nishikori, 26, is ranked sixth in the world and threatened to become only the second man to recover from two sets down against Murray.
The Japanese player hit back to lead by a break early in the fifth set before Murray dug deep to claim a remarkable win.
Double faults from Nishikori and some nerveless play at key times from Murray had seen the Scot edge the first two sets, before the effect of returning after a five-week break appeared to take hold.
Nishikori grew in confidence, playing superbly and firing a spectacular backhand winner to take the third set, and serving out the fourth at the second opportunity.
A break at the start of the fifth had the Japanese bench on their feet but Murray once again excelled under the pressure of the Davis Cup.
A fizzing forehand return winner won a spectacular game for 4-2, making it five breaks in six games, and Murray held on in two epic service games to seal the win.
Murray said: "I was a little bit calmer in the fifth set. I was panicking a little bit at the end of the third when I was struggling physically, I didn't quite know what to do.
"Last year was incredible every time I played in the Davis Cup. This team did something special and I would like to do the same again this year.
"Obviously the next match will be extremely tough and if we stick together and fight we have a chance."
Analysis - Russell Fuller, BBC tennis correspondent
"For the 14th time in a row in the Davis Cup, Murray struck the winning pose - this time at the end of a gruelling encounter which demanded every ounce of his reserves of stamina after almost five weeks away from tour.
"For all the magnificence of Nishikori's performance, Murray's exceptional willpower shone through when the chips were down. He saved set point to win the second set on a tie-break and responded after losing his opening service game in the decider by breaking Nishikori three times in a row.
"A 29th singles win equals Tim Henman's Davis Cup haul; Bunny Austin's British record is now just seven wins away."
Great Britain v Japan
Andy Murray beat Taro Daniel 6-1 6-3 6-1
Kei Nishikori beat Dan Evans 6-3 7-5 7-6 (7-3)
Andy Murray & Jamie Murray beat Yoshihito Nishioka & Yasutaka Uchiyama 6-3 6-2 6-4
Sunday reverse singles
Andy Murray beat Kei Nishikori 7-5 7-6 (8-6) 3-6 4-6 6-3
Listen to State of the British Game - a 5 live sport special