2019 champion Shane Lowry keeps his cool to stay ahead in Troon
The 2019 champion ended up with a double-bogey six at the par-four 11th after his ball appeared to be lost in a gorse bush before it was found by a spectator.
Lowry did superbly well to shrug off that setback, however, and birdied two of the last three holes to get to seven under par.
"I was in control of my ball and did all the right things for a lot of the round," he told reporters after establishing a two-stroke lead when his 20-foot birdie putt dropped at the 18th.
"Then when I got in a bit of trouble, I feel like I really finished the round well.
"I'm pretty happy with the day. To be leading this tournament after two days, it's why you come here, it's why we're here ...the job tomorrow as well is to try to put myself in a position to win this tournament on Sunday, and that's what I'll try and do."
Lowry, who won the 2019 Open at Royal Portrush by six shots, made a solid start to the second round, mixing three birdies with a lone bogey to reach the turn in two-under 34.
Playing the par-four 11th, he held a two-stroke lead but he missed the fairway and yanked his second shot way left into a gorse bush after being distracted by a cameraman. Lowry declared his ball lost before hitting a superb shot to inside 10 feet of the cup.
At that point, however, his original ball was located and, according to the Rules of Golf, his second ball on the green was no longer in play. Lowry took an unplayable lie, struck his fourth shot to just short of the green and two-putted.
"Through that whole process of 20 minutes ... of taking the drop, seeing where I could drop ... I felt like I was very calm and composed and really knew that I was doing the right thing," he said.
"To be honest, I was happy enough leaving there with a six. It wasn't a disaster. I was still leading the tournament."
After recording a two-putt birdie at the par-five 16th, Lowry struck a well-weighted approach at the last to 20 feet left of the cup before soaking up a warm ovation as he walked towards the green.
Cries of "Nice job, Shane" rang out before he coolly sank the putt.
"I have felt quite calm and composed the last couple of days," Lowry said. "I've felt really in my comfort zone."