Updated

Top-ranked Novak Djokovic returned from three weeks off and showed some signs of rust in a 6-1, 6-7 (5), 6-3 win over Spanish opponent Nicolas Almagro at the Italian Open on Tuesday.

Djokovic was poised to close the match out in straight sets with a 5-2 lead in the tiebreaker but Almagro won five consecutive points to force a third.

Almagro, whose ranking is down to No. 174 after missing the second half of last year for left foot surgery, appeared to injure his left knee at 2-2 in the third set when he came up awkwardly after attempting to retrieve a ball far off the court.

The Spaniard went over to his chair briefly during the middle of the game and rubbed his knee but decided to play on.

Djokovic broke to take a 5-3 lead and quickly closed it out in little more than two hours.

The Serb improved his winning streak to 18 matches. He's looking to defend his title at the Foro Italico, and then win the French Open for the first time.

Roland Garros, which starts in less than two weeks, is the only Grand Slam that Djokovic hasn't won.

In other second-round action on the red clay, eighth-seeded Stan Wawrinka rallied past Juan Monaco of Argentina 4-6, 6-3, 6-2.

In the first round, Guillermo Garcia-Lopez of Spain beat U.S. Open champion Marin Cilic 6-4, 6-3; 11th-seeded Feliciano Lopez ousted rising Australian Nick Kyrgios 6-4, 7-6 (4); and Ukrainian qualifier Alexandr Dolgopolov eliminated Martin Klizan of Slovakia 6-4, 6-1.

In women's action, Maria Sharapova opened her bid for a third Rome title with a second-round win over 52nd-ranked Jarmila Gajdosova. The third-seeded Sharapova was leading 6-2, 3-1 when her Australian opponent retired with a right shoulder injury.

In first-round matches, 10th-seeded Carla Suarez Navarro of Spain beat Mona Barthel of Germany 6-4, 2-6, 6-3; former No. 1 Victoria Azarenka defeated Lucie Hradecka of the Czech Republic 7-5, 2-6, 6-1; and Elina Svitolina of Ukraine eliminated local favorite Flavia Pennetta of Italy 6-4, 6-2.

Sharapova won back-to-back titles at the Foro Italico in 2011 and 2012. She was coming off a loss to Svetlana Kuznetsova in the Madrid Open semifinals and discussed adapting to faster courts and some gusts of wind.

"I was happy to hold my serve and look for the small opportunities on the return," Sharapova said. "That was my main focus today."

Later, top-ranked Serena Williams was facing Anastasia Pavlyuchenkova.

___

Andrew Dampf can be followed at www.twitter.com/asdampf