Defending champion Andy Murray guaranteed he will play for another Olympic medal after battling past Steve Johnson to reach the semi-finals.
Thursday's swirling wind, which contributed to Murray almost crashing out to Fabio Fognini, had died down and the world number two initially found the conditions much more to his liking.
But, after a dominant opening set, he faltered in the second and again found himself in a real fight before recovering from a break down in the decider to win 6-0 4-6 7-6 (7/2).
Murray will now face either fourth seed Kei Nishikori or France's Gael Monfils in the last four on Saturday and will surely need to play much better to make the final.
The 29-year-old is very much the form man of world tennis having now won 27 of his last 28 matches, 16 in a row and 10 in succession at the Olympics.
American Johnson has quietly climbed to 22nd in the world rankings but Murray won their only previously meeting in Shanghai last year comfortably.
Rain delayed the start of play for half an hour and Murray seemed keen to make up for lost time, immediately breaking Johnson's serve and racing through the first set in just 26 minutes.
Murray was pinning the American on his weaker backhand wing and showing off his full repertoire of shots.
The second set was where it all went wrong for Murray against Fognini and Johnson ended the Scot's run of 12 straight games across the two matches with a break in the opening game.
The 26-year-old does not possess Fognini's extravagant talent but his serve and forehand were combining effectively while Murray's game, particularly his backhand, had gone off the boil.
The second seed missed his only break point and Johnson served out the set to love.
The American's response after his first-set mauling had been very impressive and he made the first breakthrough in the seventh game of the decider with a Murrayesque lob.
Murray could barely contain his frustration at the way he was playing but his fighting spirit can never be questioned and he hit straight back before saving another break point in a very tense exchange.
Johnson twice successfully served to stay in the match, forcing a deciding tie-break - introduced as a rule change for this Olympics.
But Murray secured the early mini-break and never let his advantage slip, finally clinching one of the more tense wins of his career after two hours and 12 minutes.
Meanwhile, Monica Puig will become the first female athlete from Puerto Rico to win an Olympic medal after beating Petra Kvitova 6-4 1-6 6-3 to reach the women's singles final.
The unseeded 22-year-old will now aim to make more history as her country's first ever gold medallist.
Why are you making commenting on The Herald only available to subscribers?
It should have been a safe space for informed debate, somewhere for readers to discuss issues around the biggest stories of the day, but all too often the below the line comments on most websites have become bogged down by off-topic discussions and abuse.
heraldscotland.com is tackling this problem by allowing only subscribers to comment.
We are doing this to improve the experience for our loyal readers and we believe it will reduce the ability of trolls and troublemakers, who occasionally find their way onto our site, to abuse our journalists and readers. We also hope it will help the comments section fulfil its promise as a part of Scotland's conversation with itself.
We are lucky at The Herald. We are read by an informed, educated readership who can add their knowledge and insights to our stories.
That is invaluable.
We are making the subscriber-only change to support our valued readers, who tell us they don't want the site cluttered up with irrelevant comments, untruths and abuse.
In the past, the journalist’s job was to collect and distribute information to the audience. Technology means that readers can shape a discussion. We look forward to hearing from you on heraldscotland.com
Comments & Moderation
Readers’ comments: You are personally liable for the content of any comments you upload to this website, so please act responsibly. We do not pre-moderate or monitor readers’ comments appearing on our websites, but we do post-moderate in response to complaints we receive or otherwise when a potential problem comes to our attention. You can make a complaint by using the ‘report this post’ link . We may then apply our discretion under the user terms to amend or delete comments.
Post moderation is undertaken full-time 9am-6pm on weekdays, and on a part-time basis outwith those hours.
Read the rules here