Spain's Rafael Nadal needed three sets to fight off a challenge from unheralded Italian Paolo Lorenzi Wednesday in the second round of the Rome Masters, eventually taking full control in the latter stages for a 6-7 (5-7), 6-4, 6-0 victory.

Nadal struggled more than expected against the world's 148th-ranked player, who had to qualify for the tournament before defeating talented Brazilian Thomaz Bellucci in the first round.

A combination of unforced errors by the Spaniard (35 in all) and strong movement by his opponent led to a much closer match than expected.

Nadal, who is seeking his sixth title at this major clay-court event, reeled off the final eight games to take the match in two hours and 37 minutes and advance to the round of 16, where he will take on compatriot Feliciano Lopez, a 6-4, 3-6, 6-3 winner over Germany's Philip Kohlschreiber.

The world No. 1, who comes to Rome after losing the final of a clay-court event in Madrid to Serbia's Novak Djokovic and received a bye in the first round, took a 4-2 lead in the first set but then proceeded to give that advantage away with a slew of unforced errors.

After Lorenzi evened the score at 4-4, Nadal seemed to lack the intensity of his opponent, who had a surprising amount of success with his forays to the net on the slow surface.

Nadal seemed nervous and pensive during the changeovers and remained that way throughout the tiebreaker, in which he squandered a 5-3 lead by losing the final four points of the set.

With nothing to lose and buoyed by an enthusiastic crowd, the Italian seemed determined to fight for every point and take every chance to put the pressure on Nadal.

The start of the second set was nearly a carbon copy of the first, with Nadal taking an early break but then giving it right back with some sloppy play.

Lorenzi stayed even by using his quick feet to cover lots of ground on the baseline and remaining fearless about coming to the net against Nadal, who was more defensive and less dynamic with his feet than usual.

Finally, late in the second set, Nadal broke serve after a long game and closed out the set in the next game to force a decider.

In the third set, Nadal began to find his range and Lorenzi started showing signs of nerves, resulting in a decisive "bagel."

"(There) were tough moments in the match because I felt slow and I felt I was hitting the ball short all the time but still, I finished the match better," Nadal said after the match.

"I'm glad that I won and one very positive thing is tomorrow I'm going to play better for sure because worse is not possible."

The Spaniard partly attributed his troubles to the change in altitude from Madrid - roughly 670 meters (2,190 feet) above sea level - to Rome, which is only slightly above sea level.

"I think there is a difference between Madrid and Rome, different conditions and the altitude and the speed of the ball and everything is completely different," Nadal said.

"After losing the final there makes everything more difficult and you know, you do not have time for practice and you are a little bit more tired and you arrive a little bit more sad because you lost the final and all these facts make it difficult."

The win gives Nadal a better chance of holding on to his No. 1 ranking for at least a few more weeks; the second-ranked Djokovic, who defeated Poland's Lukasz Kubot 6-0, 6-3 on Wednesday, can take over the top spot in Rome if he wins the tournament and the Spaniard loses before the semifinals.

Djokovic - who has a perfect 33-0 record to start the season, just nine short of the Open Era mark set by American John McEnroe in 1984 - is aiming to be the first player other than Nadal or Switzerland's Roger Federer to hold the top spot since 2004.

Even if he does not swap places with Nadal this week, he will have an excellent chance to do so at the French Open, which gets underway later this month.

In another second-round match Wednesday involving a Spanish player, Nicolas Almagro defeated American Sam Querrey 6-3, 7-6 (7-4).

Spain's David Ferrer, who reached the Rome final last year, was forced to withdraw from the tournament due to a high fever.

Among the Latin American contingent, Argentina's Carlos Berlocq, Ferrer's replacement, lost to Croatia's Marin Cilic 6-4, 6-3 and Argentina's Juan Ignacio Chela defeated France's Gilles Simon 6-4, 6-2.