Andy Murray battled into round three of the Rome Masters with a 6-2 2-6 6-3 victory over Belgium's Xavier Malisse.
Three breaks of serve to one helped the fourth seed take the first set but world number 41 Malisse hit back in the second.
The pair swapped breaks early in the decider before the Briton secured the decisive break in game four and went on to finish the match with an ace.
Murray will now play Potito Starace after he beat Viktor Troicki 6-4 6-4.
The Scot, who lost to Brazilian Thomaz Bellucci in the third round in Madrid last week, never quite found his rhythm in his opener in Rome - and his familar problems at dealing with his own frustrations surfaced as he lurched in and out of form.
With the French Open fast approaching on 22 May, Murray overdid the drop shots, while his first-serve percentages were way too low until the final stages.
He said afterwards: "It was a tough match. I concentrated badly throughout and I've got to get better at it. When I settled down and focused I played some nice stuff but there were too many loose games.
"On this surface you need to be patient and work harder for every point. It's good to get through but it was too up and down. I just need to get the matches now. I need to get better - the main thing for me is the concentration."
The world number four was at his most erratic in the second set, which began with an ill-tempered loss of serve that prompted Malisse to play some of the best tennis of the match.
Malisse attacked at will to force a third set but Murray recovered his concentration and energy levels to break his opponent twice in the decider, and even though he remained far from convincing in some keenly-contested games the match was his with a confident final service game.
"I hit three aces in the last game because I focused right from the beginning," said Murray. "It makes life much easier for myself."
In the other late match, fifth seed Robin Soderling beat Fernando Verdasco 2-6 7-5 6-4 in an extraordinary encounter that saw a floodlight failure before the Spaniard failed to serve out from 6-2 5-4, 40-0.
"It looked a little bit bad for a while but I kept on fighting all the way to the end," Soderling told the ATP website.
"When I broke him back for 5-5 at the end of the second I felt I was playing a little bit better, I got a little bit more rhythm. When I won the second set I was really pumped up."
Other second-round winners were seventh seed Tomas Berdych, Richard Gasquet (16) and Jarkko Nieminen of Finland.
The two seeds involved in first-round matches were Stanislas Wawrinka (14) and Nicolas Almagro (9), and they duly got through their contests.
In the women's event, seventh seed Maria Sharapova needed just 54 minutes to blaze into the third round with a thumping 6-1 6-1 win over fellow Russian Ekaterina Makarova.
"I played her last week in Madrid and we split sets and I won in three sets," said Sharapova.
"It was a pretty tough and long match and I certainly wanted to get the job done faster today. It was a pretty short match and that will definitely help me going into the later rounds on clay."
Second seed and reigning French Open champion Francesca Schiavone took a little longer to dispatch American qualifier Christina McHale 6-3 6-1.
First-round winners included 12th seed Andrea Petkovic, Anastasia Pavlyuchenkova (16) and Shahar Peer (10).