(CNN) -- Roger Federer survived a push from Canadian Frederic Niemeyer on Tuesday, winning 7-6 (3), 6-4 to advance to the third round of the Rogers Cup in Montreal.
Frederic Niemeyer, left, congratulates Roger Federer following Tuesday's match in Montreal, Canada.
With the victory, Federer won his 20th consecutive match on the ATP world tour, according to the ATP Web site.
The world's top-ranked men's tennis player saved a break point in the first set and claimed the match's only break of service in the second set to defeat Niemeyer, ranked 487th in the world.
"Today all in all, I thought it was OK," Federer was quoted as saying on the ATP Web site after the match.
In other Rogers Cup action, Andy Murray cruised to a straight sets win over Frenchman Jeremy Chardy in the second round -- his first match since losing to Andy Roddick in the Wimbledon semifinals.
World number three Murray wrapped up a 6-4 6-2 victory in one hour 34 minutes to set up a third-round clash with either Juan Carlos Ferrero or Gael Monfils.
Ferrero recorded a thumping win over Lleyton Hewitt in the first round, brushing aside the Australian 6-1 6-4.
Service breaks in the opening games of each set paved the way for Murray, who could move up to second in the rankings, ahead of Raphael Nadal, if the Spaniard loses on Wednesday and the Briton reaches the last four of the competition.
"I was looking forward to getting back playing after a long lay-off," Murray told Sky Sports. "The one thing I wanted from this tournament was to play a lot of matches, three of four to get back into the swing of things.
On the prospect of becoming world number two, Murray added: "I want to try and improve my ranking as much as possible and when I've got the opportunity I would like to do it, but it's kind of at the back of my mind at the moment.
"I'm not thinking about it too much. Rafa's missed three months of the Tour. If I do overtake him it's not like I've been playing so much better than him."
In other matches, eighth seed Nikolay Davydenko won his second-round clash against Paul-Henri Mathieu in straight sets, but did not have things all his own way as he was taken to two tie-breaks -- the Russian going through 7-6 7-6 in two hours and four minutes.