Andy Murray made the perfect start to his clay-court campaign with a battling victory over Nicolas Almagro in the second round of the Mutua Madrid Open.
The Scot, who had a first-round bye, had to hang tough in the deciding set on his way to a 6-1 1-6 6-4 victory over the world number 24.
Murray, who is still searching for a coach to replace Ivan Lendl, next meets Colombia's Santiago Giraldo.
It was a very tough draw for the Wimbledon champion, who was playing his first match in a month.
Almagro is among the most dangerous players in the world on clay, as he showed by beating Rafael Nadal in Barcelona two weeks ago.
But the Spaniard is also erratic and, apparently troubled by a foot injury, he offered little in the first set.
Murray raced into a 5-0 lead, looking extremely sharp after two weeks training on clay in Valencia, and it was all Almagro could do to avoid a love set.
Murray broke serve again at the start of the second and it looked like it would be a comfortable evening but Almagro gained a foothold with a break back and on that the match turned.
Almagro sensed an opportunity and began to show just what a talent he is, overpowering Murray with a run of six games in a row.
Murray knew he needed to dig in at the beginning of the decider and he did, saving three break points in the third game.
Almagro did not drop a point on serve until the eighth game of the set, but Murray kept nudging ahead and he took his chance when his opponent served to stay in the match.
It was Murray's first win over a Spaniard on clay since beating Tommy Robredo here in 2009 and arguably one of the best of his career on the red stuff.
Murray signed the camera at the end of the match with the word 'Bally' and a heart, a tribute to former British number one Elena Baltacha, who died from cancer on Sunday.
The pair had known each other since they were part of the same Scottish team as juniors and Murray's mother Judy remained a close friend of Baltacha.
Murray took part in a tribute to Baltacha in Madrid on Monday, and he told reporters in the Spanish capital: "It's been a tough 10 days or so.
"I kind of had an idea what was going on with Elena because my mum is obviously very close with her and her husband."