MONTREAL — Sixth-seeded Venus Williams tumbled out of the Rogers Cup in the third round Thursday night, falling 6-1, 6-7 (2), 6-3 to 10th-seeded Madison Keys in an all-American match.

Playing her last tournament match before the Rio Olympics, the 36-year-old Williams lost seven straight games before holding serve in the third game of the second set. After Williams rallied to tie the match, Keys found her serve in the third set, punctuating the win with an ace on match point.

The 21-year-old Keys won the Wimbledon tuneup event in Birmingham, England, this year for her second WTA Tour title. She'll face 16th-seeded Anastasia Pavlyuchenkova of Russia in the quarterfinals.

Williams beat Barbora Strycova — the Czech player Keys topped in the Birmingham final — on Wednesday in her first match since losing to Britain's Johanna Konta on Sunday in the Bank of the West Classic final.

Pavlyuchenkova beat fourth-seeded Agnieszka Radwanska of Poland.

Pavlyuchenkova let two match points slip away while leading 5-4 in the second set and then lost the game on a double fault. She rebounded in the third set to extend her longest run at the hardcourt event.

"I think I'm still recovering from the second set," Pavlyuchenkova said. "Basically, I thought I had the match in my pocket and lost it, so I'm happy with the mental side."

Radwanska won in 2014 in Montreal.

The 15th-seeded Konta beat American Varvara Lepchenko 6-3, 6-2 to set up a quarterfinal against the winner of the late match between Canada's Eugenie Bouchard and Slovakia's Kristina Kucova.

Second-seeded Angelique Kerber of Germany beat Ukraine's Elina Svitolina 1-6, 7-6 (2), 6-4. Kerber will face Russia's Daria Kasatkina, a 7-5, 6-3 2 winner over seventh-seeded Roberta Vinci of Italy 7-5, 6-3.

Fifth-seeded Simona Halep of Romania, a finalist last year in Toronto, beat 14th-seeded Karolina Pliskova of the Czech Republic 6-3, 6-3. Pliskova, the WTA Tour ace leader, had only five in the match.

"I knew that it's going to be tough because I don't get rhythm from her," Halep said. "You never know what to expect for the next point, so there's a bit of tension. I just had to stay patient for every ball and to keep fighting because I knew that if I stay there for every ball, she can miss more than me."

Halep will face ninth-seeded Svetlana Kuznetsova, a 7-6 (2), 6-3 winner over 12th-seeded Petra Kvitova of the Czech Republic.