MONTREAL (AP) — Jessica Pegula beat doubles partner Coco Gauff 6-2, 5-7, 7-5 in an all-American match Friday to advance to the National Bank Open semifinals for the third straight year.

Tied 5-5 in the third set, the sixth-seeded Gauff double-faulted for a ninth time while defending a breakpoint to give the sixth-seeded Pegula the edge. Pegula served out to improve to 2-1 in the rivalry and end a four-match losing streak against top-10 players. Gauff was coming off a victory Sunday in Washington.

“That was a good match,” Pegula said in her on-court interview. “It’s always tough to play your doubles partner — you know exactly what you’re trying to do. It just came down to the wire and who was going to compete better.”

The top-ranked tandem of Pegula and Gauff then withdrew before their scheduled doubles match Friday, sending Shuko Aoyama and Ena Shibahara of Japan to the semifinals.

Pegula will play top-seeded Iga Swiatek of Poland in the semifinals at 12:30 p.m. Saturday. Swiatek beat American qualifier Danielle Collins 6-3, 4-6. 6-2.

Swiatek leads the tour with 50 match victories. She won the French Open in June and added her fourth title of the year last week at home in Warsaw.

“I really wanted to play powerful and I’m pretty happy that I managed to even increase the power in the third set,” Swiatek said. “For sure, I was looking for that. Today I felt like I really needed to go even higher in terms of the intensity.”