Andy Murray survived a second-set fightback from Nicolas Almagro to beat the Spaniard 6-1 1-6 6-4 and reach the third round of the Madrid Masters.
The British number one breezed though the first set in 34 minutes and seemed to have a limping Almagro at his mercy.
But the Spaniard turned the tide in the second, punishing Murray's wayward groundstrokes with powerful winners.
Murray saw off two break points at 1-1 in the decider before seizing the decisive break in the 10th game.
Playing in his first match since her death on Saturday, Murray signed 'Bally' on a courtside camera to pay tribute to former British number one and childhood friend Elena Baltacha after his win.
Murray, 27, will face Santiago Giraldo next on the clay in Spain after the Colombian's win over 11th seed Jo-Wilfried Tsonga of France.
"It was a tough match because Almagro was going for bombs on every shot, serving huge and ripping winners from the back of the court," Murray told Sky Sports.
"I felt OK - playing in the evening is not the best as my back stiffens up with the cold.
"Hopefully I can stay fit because I feel better on grass if I play through the French Open."
Murray was playing his first competitive match since his Davis Cup defeat by Italy's Fabio Fognini in early April and was given a gentle reintroduction to clay by Almagro.
The Scot lost only three points on his own serve in the first set and a medical timeout, called by Almagro for a pre-existing foot injury, was the greatest delay he encountered before wrapping up the opener with an ace down the middle.
But Almagro, who showed his pedigree on clay by ending world number one Rafael Nadal's 41-match winning streak at the Barcelona Open two weeks ago, belatedly burst into life in the second.
The 28-year-old went from seemingly being close to retiring from the match to hitting low skidding winners off both wings.
Murray's previously watertight serve was broken in three successive service games and his groundstrokes were under constant pressure as an aggressive Almagro swept up the second in startling fashion.
The momentum remained with Almagro for most of the decider with the world number 24 winning 15 successive service points, in contrast to Murray's rearguard action at the other end.
But the Wimbledon champion knuckled down, holding to love for 5-4 before Almagro flopped a backhand between the tramlines with the final shot of the match.
World number one Nadal, who Murray is seeded to meet in the semi-finals after Roger Federer's withdrawal to attend the birth of his twins, had an easy 6-1 6-0 win over Argentina's Juan Monaco.
Sixth seed Tomas Berdych saw off big-serving South African Kevin Anderson 6-1 6-4, while American John Isner and Bulgaria's Grigor Dimitrov also advanced to the last 16.
In the women's draw top seed Serena Williams powered past China's Shuai Peng 6-2 6-3, but Caroline Wozniacki, one of her predecessors as world number one, was beaten 6-3 6-3 by Italy's Roberta Vinci.
Poland's Agnieszka Radwanska saved three match points to follow up her straight-sets win over Canada's Eugenie Bouchard with a 6-3 4-6 7-6 (8-6) victory over Russia's Svetlana Kuznetsova.
Murray's brother Jamie, playing alongside Australian John Peers, suffered a 2-6 6-3 10-6 defeat by Polish duo Mariusz Fystenberg and Marcin Matkowski in the men's doubles.