Andy Murray was relieved to have battled his way past Radek Stepanek to get his Madrid Open title defence off to a winning start on Tuesday.
The second seed struggled to match Stepanek's intensity early in the opening set but managed to recover and take an early lead in the tie-break.
However, his 37-year-old opponent was back on the money in the second set to level - his movement, groundstrokes and net play too good for Murray.
His energy began to dip in the decider, though, and Murray took full advantage to wrap up a 7-6 (7-3) 3-6 6-1 win.
"To be honest in the first couple of sets he played great, taking a lot of risks, hitting the ball low over the net and moving forward," Murray told Sky Sports.
"He has already played three matches through the qualifiers and was sharp from the beginning. He was able to play his game well, he took a lot of chances and they were coming off.
"So not loads of the match was played on terms, but in the third set I used more height and that made it tougher for him to generate pace. But it was very tough."
Murray now awaits the winner of Gilles Simon's clash with Pablo Carreno-Busta in round three.