(CNN) -- Andy Murray endured a testing start to his Madrid Open title defense on Tuesday when he took more than two hours to complete a straight sets victory over Italian Simone Bolelli.
Holder Murray tasted victory after more than two hours to reach the third round of the Madrid Open.
New world number three Murray finally got the better of Bolelli 7-6 (11/9) 6-4 to set up a third-round meeting with 16th seeded Spaniard Tommy Robredo.
He was joined at the next stage by Roger Federer who imposed his game on Swede Robin Soderling for the ninth consecutive time, earning a 6-1 7-5 victory.
Murray had only met Bolelli once before, coincidentally at the same stage of this tournament seven months ago, and in that match the Scot was cruising to victory at 6-0 and 2-1 up when his rival retired.
That success came on hard court and now, with the event having switched to Murray's less-favored clay surface at the newly-built La Caja Magica, the Briton found it a lot harder going.
Murray's 11 career titles so far have all come on hard courts and he admitted he needed to improve on clay after his defeat to Juan Monaco in the second round of the Rome Masters two weeks ago.
He enjoyed a happier outing in the Spanish capital, but he was made to sweat by Bolelli, especially during the first set which lasted an hour and 17 minutes after going to a tie-break.
The second set proved a similarly close affair and Murray again looked in a spot of bother when Bolelli earned a break point in the seventh game.
Murray once more managed to survive that though, and after the first nine games had gone with serve, he had his first chance to win the match after establishing a break point in the 10th game.
Bolelli saved that with an ace down the middle, but Murray hit back immediately to fashion another match point. This time Bolelli saw his forehand crash into the net and Murray celebrated victory.
Swiss second seed Federer, who lost a Rome semifinal to Novak Djokovic, is chasing his first title of the season and admits that winning Roland Garros for a first time is his current major goal.
Federer's victory in 69 minutes was his 15th at a tournament where he has played the quarterfinals or better in all five of his previous visits.
The Swiss went down a break in the second set after collecting the first in a mere 20 minutes.
But after falling to 2-4, the second seed broke straight back and secured his fourth break of the evening for a 6-5.
Serving it out, Federer ended with his 10th and 11 aces to advance comfortably and now faces the winner from American James Blake and Croatian Ivo Karlovic.
Blake, the Estoril finalist, continued his new clay success over Victor Hanescu 6-2 6-4 while Karlovic rode his big serve to a defeat of Julien Benneteau 3-6 7-6 (7/5) 6-4.
World number eight Fernando Verdasco defeated former champion Juan Carlos Ferrero 6-3 6-2 for a third-round place while Robredo put out last week's Estoril quarterfinalist Mardy Fish 3-6, 7-6 (7/5), 6-2.
In the first round, Russian tenth seed Nikolay Davydenko continued his improvement after coming back from three months away with a heel injury, advancing over Viktor Troicki of Serbia 6-2 6-2.
On the women's side, fourth seed Jelena Jankovic got off to a win, beating Daniela Hantuchova 7-5 6-2 while Danish number nine Caroline Wozniacki crushed American Varvara Lepchenko 6-3 6-1.
Unseeded Amelie Mauresmo overwhelmed China's 15th seed Jie Zheng 6-2 7-5.