Eugenie Bouchard is off to the second round of the 2016 Rogers Cup.

Playing in front of a hometown crowd in Montreal, Bouchard defeated Lucie Safarova of the Czech Republic 6-3, 3-6, 7-6 (3) on Tuesday. She’ll face either Dominika Cibulkova of Slovakia or Mariana Duque-Marino of Columbia in the next round.

RELATED: Canadian tennis stars hit home courts
RELATED: Bouchard named to the Olympic team

Eugenie Bouchard of Canada returns the ball against Lucie Safarova of the Czech Republic during women's first round Rogers Cup tennis action in Montreal on Tuesday, July 26, 2016. THE CANADIAN PRESS/Paul Chiasson

Eugenie Bouchard of Canada returns the ball against Lucie Safarova of the Czech Republic during women’s first round Rogers Cup tennis action in Montreal on Tuesday, July 26, 2016. THE CANADIAN PRESS/Paul Chiasson

The Montreal native, ranked 42nd in the world, got off to a strong start on Tuesday, winning the first set 6-3. But Safarova, ranked 28th, battled back in the second, winning 6-3 to tie the match at 1-1.

In the third set, Bouchard went up 6-5 but let three match points slip away, setting up a tie-breaker. The 22-year-old Canadian fell behind 3-1 in the tie-breaker but won the next six points to earn the victory.

Bouchard is coming off a first round loss at the Citi Open in Washington, DC last week. Before that, she made it to the round of 32 at Wimbledon, falling to the 18th-ranked Cibulkova.

RELATED: Bouchard pulls off Wimbledon upset

Eugenie Bouchard of Canada returns the ball against Lucie Safarova of the Czech Republic during women's first round Rogers Cup tennis action in Montreal on Tuesday, July 26, 2016. THE CANADIAN PRESS/Paul Chiasson

Eugenie Bouchard of Canada returns the ball against Lucie Safarova of the Czech Republic during women’s first round Rogers Cup tennis action in Montreal on Tuesday, July 26, 2016. THE CANADIAN PRESS/Paul Chiasson

This is the final tournament before Rio 2016 for Bouchard, who will be one of four tennis players on Team Canada. She’ll compete in both singles and doubles at this year’s Olympic Games.

Gabriela Dabrowski, who was eliminated from Rogers Cup doubles play on Monday with Russian partner Alla Kudryavtseva, will team up with Bouchard for doubles in Rio.

Team Canada’s men’s tennis players, Daniel Nestor and Vasek Pospisil, are also in action this week, playing in Toronto.