Updated

ROME (AP) — Roger Federer lost his opening match of the clay-court season, beaten by 40th-ranked Ernests Gulbis of Latvia 2-6, 6-1, 7-5 on Tuesday.

In the 16-time Grand Slam champion's first singles match in nearly a month, Federer had an easy first set but his form then dropped drastically. The top-ranked Swiss struggled with his consistency under a light rain as the match wore on. Gulbis held on at the finish, winning on his seventh match point.

Federer took off several weeks after losing to Tomas Berdych in the fourth round in Key Biscayne, Fla., on March 30.

Federer played a rare doubles match Monday, teaming with Yves Allegro in a victory.

Federer reached the semifinal here last year and went on to win his first Grand Slam title on clay at the French Open a few weeks later. This year's tournament at Roland Garros begins on May 23.

Playing inside the tournament's new 10,500-seat stadium, Gulbis appeared nervous at the start and Federer won the opening set easily.

Federer didn't face a break point until the fourth game of the second set, when he missed a forehand wide to end a long rally and hand Gulbis a 3-1 lead. Gulbis then broke again to go up 5-1 when Federer made a series of errors — including a rare overhead miss.

Federer committed 15 unforced errors to Gulbis' eight in the second set alone, and his form in the final set was even worse, missing one routine baseline shot after another.

In all, Federer committed 38 unforced errors to Gulbis' 39, and trailed 20-33 in winners. Federer also struggled with his serve, landing only half of his first attempts to Gulbis' 71 percent.

Gulbis double-faulted on match point twice and made errors on each of his first six chances before Federer finally hit a backhand into the net to end it.

Gulbis also took Federer to a third set before losing in the quarterfinals in Doha in January, then won his first career title in Delray Beach, Fla., in February. He is coached by Hernan Gumy and credits the Argentine pro with his improved form.

Earlier, Novak Djokovic began his bid to reach a third consecutive final at the Foro Italico with a quick 6-1, 6-1 win over French opponent Jeremy Chardy.

Also, Lleyton Hewitt pulled out a 6-4, 4-6, 6-3 win over ninth-seeded Mikhail Youzhny, a positive step in the Australian's comeback from hip surgery.

Victor Hanescu of Romania beat another seeded player, No. 16 Juan Monaco, 7-6 (4), 6-4.

In other matches, Stanislas Wawrinka of Switzerland easily beat Juergen Melzer of Austria 6-1, 6-2; Feliciano Lopez of Spain advanced past Benjamin Becker of Germany 6-4, 6-3; and Italian wild card Simone Bolelli eliminated German lucky loser Simon Greul 6-4, 6-1.

Djokovic never faced a break point and served well from start to finish — a sharp contrast from his semifinal loss to Fernando Verdasco at the Monte Carlo Masters two weeks ago.

The second-ranked Serb also managed to maintain his focus when rain picked up at the end of the second set, closing the match out in 59 minutes.

Djokovic won the Rome title in 2008 and lost last year's final to Rafael Nadal.

Youzhny committed 59 unforced errors to Hewitt's 34 and dropped to 1-4 in his career against the former top-ranked player, who underwent surgery on Jan. 29. Their match lasted 2 hours, 29 minutes.