With Sharapova serving at 4-4 in the third set, Kontaveit broke through in a brutal 17-minute game that featured nine deuces to put the match in her hands. Sharapova reached 30-30, but the 16th seed denied the former finalist any chance of a comeback by crossing the finish line on her first match point, securing her place in the second round after two hours and 41 minutes of work.
Kontaveit improved to 1-1 against the five-time major champion, having lost their first meeting two years earlier in Stuttgart. The 23-year-old Estonian now awaits the winner of Carla Suarez Navarro and Venus Williams.
Sharapova dropped to 1-3 since returning in mid-June from a right-shoulder injury that sidelined her for nearly six months. She came into Toronto ranked No. 81.