Andy Murray survived a major scare against Italy's Fabio Fognini to reach the quarter-finals in Rio.
The 2012 champion had cruised through his opening two matches and another easy win looked on the cards when he led by a set and a break.
But the momentum turned abruptly and Fognini, one of the most talented but unpredictable players on tour, seized his chance.
The world number 40 won eight games in a row to lead 3-0 in the decider before Murray, as he so often does, fought back from the brink to claim a 6-1 2-6 6-3 victory.
In the last eight he will take on American Steve Johnson, who defeated Russia's Evgeny Donskoy.
Fognini was the last man to beat Murray in Davis Cup, when Britain lost to Italy in the quarter-finals two years ago, but facing the 29-year-old on a clay court in Naples was a rather different proposition to a slow hard court on a windy Rio day.
Given what transpired, it was hard to believe how poorly Fognini played in the opening set, with a smattering of boos for the Italian's lacklustre performance.
He at least roused himself to save three set points and avoid a bagel but Murray was on cruise control.
When the Scot broke to lead 2-1 in the second set, he seemed on his way to the quarter-finals with the minimum of fuss, but Fognini found his form and Murray began to make errors.
Five straight games from the Italian brought him level at one set all and left Murray needing to fight hard to keep his medal hopes alive.
Fognini was on the front foot and having a lot of success at the net, and he maintained his form at the start of the third set with a break for 2-0.
Murray had two chances to hit back but could not take them and, had Fognini converted a chance to lead 4-1, the outcome might have been different.
But Murray broke back and the wheels fell off for Fognini as the world number two reeled off six games in a row.
Murray joined Rafael Nadal and Juan Martin Del Potro, who are on course for a semi-final meeting, in the last eight.
Nadal, who has never lost an Olympic singles match having won the title in 2008 and missed out in London through injury, continued his impressive form with a 7-6 (7/5) 6-3 victory over Frenchman Gilles Simon.
The 14-time grand slam champion arrived in Rio having not played a match since the French Open and admitting his troublesome wrist was still not fully recovered.
But he has looked sharp and confident and is still fighting for a medal on three fronts, having reached the semi-finals of the men's doubles with Marc Lopez as well as entering the mixed doubles alongside Garbine Muguruza.
Nadal next plays Brazil's Thomaz Bellucci, whose upset win over David Goffin was celebrated with a huge roar.
Del Potro, the conqueror of Djokovic in round one, lost the opening set to Japan's Taro Daniel but recovered to win 6-7 (4/7) 6-1 6-2.
Big-hitting American Madison Keys was the first woman through to the semi-finals, with the 21-year-old beating Daria Kasatkina of Russia 6-3 6-1.
Petra Kvitova has been in great form in Rio and the Czech blitzed Serena Williams' conqueror Elina Svitolina 6-2 6-0 to set up a last four clash with Puerto Rico's Monica Puig.
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