CHARLOTTE, N.C. — Justin Thomas emerged from the shadow of a longtime friend and won the PGA Championship to take his place among the young elite in golf.

With two big breaks to start the back nine, a chip-in for birdie and a 7-iron that soared over the water to a peninsula green, Thomas closed with a 3-under 68 and won by two shots. The PGA Championship was the most fitting major for the 24-year-old son of a PGA professional.

Mike Thomas, a former PGA board member and longtime pro in Kentucky, walked along the edge of the 18th green and into the arms of his son, a major champion.

The week began with Jordan Spieth’s quest for a career Grand Slam. Spieth was at the 18th green late Sunday afternoon at Quail Hollow, but only so he could celebrate the moment with Thomas, close friends since they were 14.

“So awesome, dude,” Spieth told him.

It was every bit of that.

With five players still in the mix in the final hour, Thomas surged ahead by chipping in from 40 feet on the par-3 13th hole and holding his nerve down the stretch as his challengers eventually faded, one after another.

Hideki Matsuyama, bidding to become the first player from Japan to win a men’s major, appeared to recover from back-to-back bogeys with two straight birdies on the 14th and 15th holes to get within one shot. But the championship turned on the 16th hole.

Thomas faced a 6-foot par putt to stay at 8 under. Matsuyama caught a good lie over the green and chipped to 5 feet. Thomas wasted no time over his putt and drilled it in the center of cup. Matsuyama missed and was two shots behind.

“The last major of the year, and I was in contention,” said Matsuyama, a runner-up at the U.S. Open. “All I can do is try harder next time.”

Thomas sealed it on the next hole with a 7-iron from 221 yards that cleared the water and rolled to 15 feet. The birdie putt curled in, and his lead was up to three going to the 18th. A final bogey only affected the winning margin.

He finished at 8-under 276, earning his fourth victory of the year.

The PGA has been part of the Thomas family for three generations. Paul Thomas, his grandfather, was the longtime pro at Zanesville Country Club in Ohio and played in the 1962 U.S. Open. His father played at Morehead State and had aspirations of playing the PGA Tour that didn’t last long. Instead, Mike Thomas became a club pro who watched his son fall in love with the game and grow into a force on the PGA Tour.

“I can’t put it into words,” Thomas said about his PGA of America heritage. “I wish my grandpa could be here for it. It’s so special to get it done. I’ve glad we have a trophy now.”

Kevin Kisner was the last player who had a chance to catch Thomas. But he three-putted from 100 feet on the 16th for bogey, couldn’t birdie the 17th from long range and hit his second shot into the water on 18 and finished with a double bogey. Kisner, the 54-hole leader, closed with a 74.

“That’s not going to be fun to look at,” he said of his weekend finish over the brutal closing stretch at Quail Hollow. “I thought I had to get to 10 (under) starting the day to win, and that was about right. I had every opportunity. I just didn’t finish it off.”

Matsuyama also hit into the water on No. 18 and made bogey for a 72 to finish three back.

Louis Oosthuizen (70), Patrick Reed (67) and Francesco Molinari (67) tied for second, though none had a chance to win at the end.

For Reed, it was his first top 10 in a major.

Just two months ago, fresh off a record-tying 63 in the U.S. Open to get into the final group at Erin Hills, Thomas struggled from the start and shot 75. He started this final round two shots behind, skulled a bunker shot on the first hole and had to make a 15-foot putt to avoid double bogey. He missed a short par putt on No. 3, but that was the last mistake he made until it no longer mattered.

Thomas began his move with a 35-foot birdie putt on No. 9, then caught two breaks on the par-5 10th. His tee shot sailed left into a tree and bounced out into the fairway. Then, his 8-foot birdie putt hung on the left edge of the cup. Thomas smiled and lazily turned away, but a few seconds later as he looked back toward the hole, gravity took over and the ball dropped into the cup.

He had a chance for a knockout until failing to birdie the two easiest holes on the back nine, only to make up for it with a tough bunker shot on the 16th that led to his clutch par, and a 7-iron on No. 17 that made him a major champion.

He gets referred to endlessly as Spieth’s best friend because Spieth, who is 3 months younger, has done so much so quickly. Their friendship dates to when they represented the U.S. in the Evian Junior Masters in France. Thomas won that 36-hole event.

Ten years later, they have won consecutive majors and head into the FedEx Cup playoffs battling for PGA Tour player of the year.