CHARLOTTE, N.C. — The greatest Olympian, Michael Phelps, followed Jordan Spieth from inside the gallery ropes on Thursday as Spieth began his own bid for a piece of history at the P.G.A. Championship.

Phelps, a 28-time Olympic medalist in swimming, also had been inside the ropes, figuratively, during the final round of last month’s British Open.

After Spieth got off to a rough start, his caddie, Michael Greller, mentioned a recent photograph of Spieth posing with Phelps and the retired basketball icon Michael Jordan and reminded him that he belonged in the company of those sporting greats. Spieth said Greller’s words were a catalyst in his closing out his third major victory to pull to within a P.G.A. Championship title of a career grand slam.

“I loved that Michael did that,” said Phelps, who stuck around an extra day after playing in a sponsor’s golf event at a nearby course so he could demonstrate his belief in Spieth in his bid to become the sixth, and youngest, man to win all four majors in his career.