By Steve Keating

MONTREAL (Reuters) - Rafa Nadal fluffed his lines on the return from five-week break when the Spanish world number two was stunned 1-6 7-6 7-6 by unheralded Croatian Ivan Dodig in his opening match of the Montreal Masters on Wednesday.

Back in action for the first time since losing to Novak Djokovic in the Wimbledon final on July 3, Nadal had looked poised for a routine comeback victory after storming through the opening set of the second round encounter.

However, the 41st ranked Croatian had other ideas and would not be bullied by the muscular Mallorcan, matching Nadal shot-for-shot before ending the three-hour thriller with a backhand cross-court winner.

Despite an inconsistent performance, Nadal had his chances to seal the contest when he led 5-3 in the deciding set and served for the match, but the two-time champion on Canadian hard courts was unable to put away his stubborn opponent.

It was Nadal's first opening match defeat in a tournament since Rome 2008.

The loss will be a blow to Nadal's Flushing Meadows preparation, where the Spaniard will launch the defense his U.S. Open crown later this month.

"I don't feel I played bad but in the decisive moments I didn't play well," Nadal told reporters.

"He didn't feel the pressure in the important moments and at the end of the match, probably I was a little bit unlucky.

"I felt like I played well enough to win but that's tennis."

The late night shock, provided an unexpected twist to the end of a day that had gone largely according to script, with 10 of the 13 seeds in action enjoying a safe passage into the third round.

Djokovic's reign as world number one got off to a sluggish start as the Serb scrambled to a 7-5 6-1 win over Russian Nikolay Davydenko, while Roger Federer entered his 30s with a clinical 7-5 6-3 victory over Canadian Vasek Pospisil.


But the Russian could only win two more games as Djokovic shifted into top gear, reeling off six straight service breaks to turn the match around before sealing victory as lightning crackled around the stadium.

"I'm just trying to handle it (being number one) the best possible way but on the other side trying to keep my life very simple, the way it was before," Djokovic told reporters.

"Of course, the world is looking at me a bit differently."

It was also business as usual for the Swiss maestro once the match started, the former number one beginning his tune-up for the U.S. Open with a gentle workout.

While there were a few noticeable signs of rust, there was no evidence of a tennis mid-life crisis, as Federer brushed aside the 21-year-old Canadian, who grew up idolizing him.

Federer was not at his sharpest against Pospisil, piling up unforced errors with some wayward groundstrokes, but there was never any panic as the world number three slowly warmed to his task, finally breaking the Canadian to take the first set.

Back in rhythm, Federer quickly put his stamp on the match, breaking his opponent at the first opportunity in the second on the way to a straightforward victory over the 155th ranked wildcard.

"It felt good," Federer said. "It was my first match outdoors on hard courts... it was a bit tough."

(Editing by John O'Brien)