Taylor Fritz battled Czech Jiri Lehecka for three hours before coming through with a 7-6 (7/4), 6-7 (5/7), 7-6 (7/5) victory to reach the quarter-finals of the ATP Toronto Masters.
The US second seed finished off a complete matched set of Masters 1000 quarter-finals as the last piece of the puzzle fell into place in Canada.
The late-night marathon lasted 39 games without a break of serve, with 15 aggregate break points going begging.
Fritz delivered two aces in the final-set tiebreaker on his way to the narrow win, moving into the last eight as Lehecka drove long.
"Making all the Masters quarters is really cool," Fritz said.
"It shows consistency.
"Today I had to accept that parts of my game were just not there. I was bailed out by a lot of first serves, but I was making too many mistakes."
Fellow American Ben Shelton earned a second chance after Flavio Cobillo failed to serve out their match, with the fourth seed finally securing a somewhat contentious 6-4, 4-6, 7-6 (7/1) win.
The winner, who now plays Alex de Minaur, earned his 100th ATP-level win after nearly two and a half hours, firing an ace on his second match point to wrap up a place in the last eight for a third straight tournament after Wimbledon and Washington.
De Minaur pushed his ATP winning streak to seven matches as he fended off Frances Tiafoe 6-2, 4-6, 6-4.
The Australian won the Washington title on Sunday before plunging into the chaotic schedule at Toronto, where play began on the weekend and will continue through Thursday.
De Minaur added his voice to the growing chorus of player complaints about the new 12-day Masters calendar, which will see play start in Cincinnati this week before Canada completes its unorthodox Thursday night final.
Sixth seed Andrey Rublev, runner-up last year when the tournament was held in Montreal, reached his 14th Masters quarter-final 6-7 (3/7), 7-6 (7/2), 3-0 when Spaniard Alejandro Davidovich Fokina was forced to retire with possible cramping.
Both men ended the battle with 37 unforced errors, with sixth seed Rublev to play Fritz for a semi-final spot. (AFP)