Japanese number one Kei Nishikori won an intense contest with Frenchman Gael Monfils at the Olympic Tennis centre in the Barra Olympic Park.
For a long time it seemed like the world number seven was destined to suffer a repeat of London 2012 where he exited at the quarter-final stage.
Nishikori claimed the first set in a tie-breaker with neither player able to find a break in a tense opening stanza. He seized the first mini-break but immediately lost his advantage on the next point. Monfils serve misfired under pressure though and Nishikori took the set after a brace of mini-breaks.
Monfils dropped serve in the opening game of the second set but was able to break right back before finding his rhythm. The world number 11 would claim a break in the tenth game to force a deciding set.
The tension of the first set returned with neither player able to find a break of serve, sending the match into a deciding tie-breaker.
Monfils started stronger and raced to a 6-3 lead, but the Frenchman could not take advantage of three match points as Nishikori displayed nerves of steel to win five consecutive points and book a semi-final clash with Wimbledon champion Andy Murray.
Murray squeezed into the Olympic semi-finals with a hard-fought 6-0, 4-6, 7-6 (7-2) win over American Steve Johnson.
The Scot took the opening set to love but had to overcome a spirited fight back from the world number 22.
Johnson broke Murray's serve in the first game of the second set and saved a break point in the sixth game ultimately claiming the second stanza 6-4.
The pair traded breaks in the final set before Murray claimed the match in a nerve wracking tie-break.
Third seed Rafael Nadal is also through to the last four after overcoming crowd favourite, Brazilian Thomaz Bellucci in three sets.
The world number five took the opening set 6-2 before Belluci forced the match into three sets by winning the second 6-4.
Belluci broke Nadal in the fourth game of the second stanza only to have the Spaniard break as he was serving for the set; it wouldn't matter though as the Brazilian broke again in the very next game.
The experienced Nadal would then show his class in the final set as he powered to a 6-2, 4-6 and 6-2 win.
2012 Olympic bronze medallist Juan-Martin del Potro booked a place in the semi-finals for the second successive games when he beat Spain's Roberto Bautista-Agut in straight sets 7-5 and 7-6.
The world number 141 took an early advantage, breaking his opponent twice in the opening three games of the first set but made life tough for himself, dropping his serve in the fourth game and again when he was serving for the set at 5-4 – though he broke back immediately and held his serve to close out the opener.
The second set followed a similar pattern to the first with del Potro breaking early before Bautista-Agut fought back in the fourth game. The remainder of the set went to serve before the Argentine won the tie-break to take a giant leap towards a second Olympic medal.