SOUTHPORT, England (AP) — During one of Jordan Spieth's many low points Sunday in the British Open, his caddie reminded him of a photo from a Mexico beach holiday two weeks ago that showed him in All-Star company that included Michael Phelps and Michael Jordan.

The message: "You belong in that group."

Spieth left little doubt with a closing performance that ranks among the greatest finishes in major championship history.

Trailing for the first time all weekend at Royal Birkdale — and lucky it was only one stroke thanks to a shot from the driving range — the 23-year-old Texan followed with a birdie-eagle-birdie-birdie stretch that allowed him to close with a 1-under 69 and win the British Open by three shots over Matt Kuchar.

Spieth captured the third leg of the career Grand Slam and heads to the PGA Championship next month with a chance to be the youngest to win them all.

"This is as much of a high as I've ever experienced in my golfing life," Spieth said.

And it all started in a spot so dire it looked as though he would endure another major meltdown.

The break of the tournament — and a moment that will rate alongside Seve Ballesteros making birdie from the car park when he won at Royal Lytham & St. Annes in 1979 — was when Spieth discovered the range was part of the course.

His tee shot was so far to the right on the par-4 13th hole that it sailed some 75 yards from the fairway and settled in thick grass on a dune so steep he could hardly stand up, let alone take a swing. The only smart option was to take a one-shot penalty for an unplayable lie.

And that's when Spieth showed his golfing brain is as valuable as any club in his bag.

He had the presence to ask if the driving range was out of bounds. It wasn't, which allowed him to go back in a straight line from the flag until he was on the range among the equipment trucks. After getting free relief from them, he still faced a blind shot over the dunes to a hole littered by pot bunkers. He hit 3-iron just short of a bunker near the green , pitched over it to about 7 feet and made what he considers the most important putt of the day to escape with bogey.

And then came the finishing kick like Phelps, the go-ahead jumper like Jordan.

Spieth hit 6-iron to the 14th that landed in front of the flag and came within inches of an ace, leading to a short birdie putt to regain the lead. On the par-5 15th, he rolled in a 50-foot eagle putt and playfully barked at caddie Michael Greller to pick it out of the cup. "Go get that," he said, pointing to the hole.

And he wasn't done.

Spieth rolled in a 30-foot putt across the 16th green for a two-shot lead, and he kept that margin by pouring in a 7-foot putt to match birdies with Kuchar.

The final putt for par was a tap-in, as easy a shot as he had all day.

"To follow that bogey on 13 with great golf shots and great putts, and play the final five holes in 5-under par, I was just very happy for him and very impressed to watch all that guts, determination and skill," Jack Nicklaus posted on Facebook.

Spieth and Jack Nicklaus are the only players to win three different majors at age 23.

"This is a dream come true for me," Spieth said, gazing at his name on the silver claret jug. "Absolutely a dream come true."

For so much of Sunday, it felt like a recurring nightmare.

Just 15 months ago, Spieth lost a five-shot lead on the back nine at the Masters, coming undone with a quadruple-bogey 7 on the 12th hole. It was more of a slow bleed at Royal Birkdale, with three bogeys on the opening four holes and four putts inside 8 feet that he missed on the front nine to fall into a tie with Kuchar.

"I put a lot of pressure on myself unfortunately, and not on purpose, before the round today, just thinking this is the best opportunity that I've had since the '16 Masters," he said. "And if it weren't to go my way today, then all I'm going to be questioned about and thought about and murmured about is in comparison to that. And that adds a lot of pressure to me.

"Closing today was extremely important for the way I look at myself."

Kuchar, playing in the final group of a major for the first time, could only watch. He had a one-shot lead after 13 holes, played the next four holes with two birdies and two pars and found himself two shots behind and out of luck.

Kuchar walked off the green to find his wife and two sons waiting, a surprise because they had been in Colorado the day before, and it added to the emotions.

"It's crushing. It hurts. And it's an excitement and a thrill to have played well, put up a battle, put up a fight," said Kuchar, who closed with a 69. "I can only control what I do, how I play. Jordan is a great champion and certainly played that way in the finishing stretch today. It was impressive stuff. All you can really do is sit back, tip your cap and say, 'Well done.' And it was certainly a show that he put on."

Zach Johnson, Justin Thomas and Rickie Fowler were among those who waited by the 18th to watch Spieth capture yet another major. Johnson won at St. Andrews two years ago, when Spieth missed the playoff by one shot in his bid for the calendar Grand Slam. Spieth drank wine from the jug that year, which he was told was bad luck for anyone wanting to possess the trophy one day.

"I started to believe them a bit through nine holes today," he said. "It feels good to have this in my hands."

From the driving range to the claret jug, Spieth put himself in hallowed territory just four days before his 24th birthday. Gene Sarazen in 1923 was the only other player with three majors before turning 24.

Spieth won for the third time this year, moved to No. 2 in the world and already has 11 victories on the PGA Tour.

Li Haotong of China shot a 63 and finished third at 6-under 274. He was on the practice range in case the leaders came back to him, and it was odd to see Spieth join him there as he tried to figure out how to get out of his jam.

Moments later, when he heard one massive roar after another, Spieth delivered the answer.