MONTREAL -- Gael Monfils avoided a first-round upset as he rallied from a set down to beat Steve Johnson 2-6, 7-6(1), 6-1 on Monday at the Rogers Cup.

Johnson, ranked No. 35 in the world, broke the 22nd-ranked Monfils twice in the first set, winning 28 of 46 possible points.

But Monfils became more dangerous as his service game improved. He wasn't broken again and finished with 11 aces.

"It took me a long time in the match to start feeling better and more fluid," said Monfils. "I was not confident. I had trouble moving."

The second set went the distance, with the Frenchman dominating the tiebreak. Monfils was unstoppable in the deciding set, winning all but 10 points.

"At 4-3 in the second set, I started putting the ball in the court," said Monfils. "I was able to move better. I was able to make it more difficult for him."

The 30-year-old Monfils will face Japan's Kei Nishikori in the second round. The 9th-ranked Nishikori, who lost in the Rogers Cup final last year, received a first-round bye.

Also in the afternoon session, David Ferrer of Spain, ranked No. 33, defeated 43rd-ranked Kyle Edmund of Britain 6-7(5), 6-4, 6-3 in a marathon match that lasted 2 1/2 hours.

Earlier in the day, Nick Kyrgios was dominant in a 6-1, 6-2 victory over Viktor Troicki. The 24th-ranked Kyrgios won the match in 51 minutes.

The Australian broke Troicki's serve four times, including twice in each set. He finished with eight aces to Troicki's two.

"For me, it was an OK match," said Kyrgios. "I didn't feel like I hit the ball extremely well. I didn't serve great. I thought I served OK.

"He (Troicki) played far from his best tennis. I've seen him play unbelievable tennis. We all have. He's been struggling physically, as well."

Between the end of the first set and the start of the second, the 22-year-old Kyrgios won 18 consecutive points as he went up 4-0 in the second set.

Kyrgios faces either Frances Tiafoe of the United States or Paolo Lorenzi of Italy in the second round.

Vancouver's Vasek Pospisil, ranked No. 75 in the world, and Peter Polansky of Toronto, ranked No. 116, play each other in the evening session on Monday.

Toronto's Brayden Schnur, ranked No. 197, faces an uphill battle in an opening-round match against 29th-ranked Richard Gasquet of France.

Milos Raonic, a product of Thornhill, Ont., received a first-round bye and plays his opening match on Wednesday afternoon.

Raonic was initially scheduled to play on Tuesday night, but Tennis Canada says the Canadian asked for an extra day off to recover from a minor injury sustained during practice.

Notes: Wayne Gretzky was in attendance at the Rogers Cup on Monday afternoon. He watched Canadian Denis Shapovalov practice on one of the side courts.