Rory McIlroy was on the rocks late in his third round at the DP World Tour Championship.
Some cliff-edge improvisation, followed by a final-hole birdie, put him back in control.
Seeking a second straight victory to end his season, McIlroy delivered another wild finish at Jumeirah Golf Estates in shooting a 5-under 67 that left the four-time major champion with a one-stroke lead on Saturday.
Sam Horsfield bogeyed the 18th hole to shoot 69 and drop out of a share of the lead with McIlroy, who was 14 under overall in the season-closing event on the European Tour.
Collin Morika8wa, still on course to become the first American to finish a season as the tour's No. 1 player, was three shots back in a four-way share of fifth place after his round of 69.
Standing on the tee at the par-3 17th hole holding a one-stroke lead, McIlroy missed the green left and saw the ball bounce through the rough and dance along the edge of the cliffs. It eventually settled on a narrow ledge, to gasps among spectators.
McIlroy opted against taking a drop, which was the preferred choice of his caddie, Harry Diamond, and managed to clip a shot off the stone and through the green. He missed the return chip by inches, but a par was a good result given what could have happened.
"Harry was pleading with me not to hit it," McIroy said. "He was like, 'We can just go back and make 4 at the last.'"
McIlroy then pitched to 9 feet with his third shot - from just on the green - at the par-5 18th and holed the birdie putt which would regain the lead after Horsfield's bogey a few minutes later.
McIlroy, who won the CJ Cup in Las Vegas last month, closed his second round on Friday with a double-bogey 7 after hitting into water at the 18th.
He made a dreadful start to his third round, too, snap-hooking a 3-wood off the first tee and making a bogey.
McIlroy responded with birdies at Nos. 2 and 3 - two of the seven he had in total.
Morikawa, playing alongside McIlroy, birdied three of his first six holes to move into a tie for the lead with his playing partner and four others. The American made par on each of his final 12 holes to slip off the pace.
"It was all over the place," Morikawa said. "Front nine played pretty good but overall just didn't take advantage of the par 5s.
"All three days have kind of been a little bit of this, a little bit of that, and got one more day to kind of put everything together and hopefully put a low one out there."
Morikawa is the highest-placed of the six players who can still win the Race to Dubai and is unlikely now to need a victory to clinch the title.
Billy Horschel is second behind Morikawa in the points race but is 37th in the 52-man field, eight shots adrift of his compatriot.