BETHESDA, Md. (AP) — In Gee Chun was an upbeat, smiling presence throughout the Women’s PGA Championship — easy enough when you shoot 64 in the first round and lead comfortably for much of the tournament.

In the final round, all of her positive thinking was put to the test.

“Golf is never easy,” the 27-year-old South Korean said.

Chun won her third major championship, playing her best in the first round on a wet day and then persevering through a steamy weekend at Congressional. On Sunday, she quickly lost what was left of a once-sizeable lead, then rallied to win by one when Lexi Thompson’s putting faltered down the stretch.

Chun shot a 3-over 75 on each of the last two days of the tournament. She finished at 5-under 283, barely enough to beat out Thompson (73) and Minjee Lee (70) by a stroke.

“Before start today my coach told me, ‘In Gee, if you enjoy your game, this trophy is yours,’” Chun said. “Sometimes it’s really hard to keep smiling when my game, I mean, going not good, but I think I hung in there. So I’m so proud now.”

After leading by six at the tournament’s midway point, Chun lost a three-shot advantage in the first three holes of the final round. Thompson was two strokes ahead of Chun after the front nine, but Thompson’s putting problems were just beginning.

The 27-year-old Floridian botched a par putt from a couple feet on No. 14, but a birdie on 15 restored her lead to two. Then she bogeyed the par-5 16th while Chun made birdie, leaving the two players tied with two holes remaining.

Thompson, who declined a post-round news conference, three-putted for bogey on 17. After an impressive approach from the rough on 18, her birdie putt wasn’t hit firmly enough.

Chun’s approach on the par-4 18th bounced past the hole and just off the back of the green, but she putted to within about 5 feet and sank her par attempt for the win.

It was Chun’s first victory anywhere in the world since 2018 and only her second in the United States — her first was the 2015 U.S. Open. She won her second major the following year at the Evian Championship in France.

Now, Chun is the third player from South Korea to win at least three majors, trailing Inbee Park (seven) and Se Ri Pak (five).

Chun led by seven strokes after finishing her 8-under 64 in wet conditions Thursday. The lead was down to five at the end of that day — still equaling the largest 18-hole advantage in the history of women’s majors.

That impressive beginning gave her some room for error — and also set her up for a potentially grueling weekend of high-pressure golf. She was still six strokes ahead entering Saturday, but the lead was down to three after three rounds.

“The first day, she was really excited because of the 64,” caddie Dean Herden said. “It’s hard to calm down after a 64 because you’re pumped.”

Thompson hasn’t won an LPGA Tour event since 2019, and her lone major victory came as a teenager at Mission Hills in the California desert in 2014. She’s certainly had chances. She lost a five-stroke lead during the final round of last year’s U.S. Women’s Open at Olympic Club.

At Congressional she was 10 strokes back after the first round before steadily chasing down Chun. Thompson made birdies on Nos. 1 and 3 on Sunday. Chun bogeyed Nos. 2 and 4 to fall behind.

Thompson missed short birdie putts on the eighth and ninth — foreshadowing her problems later in the round — but Chun’s 40 on the front nine left her two back at the turn. Sei Young Kim, who had made it to 6 under at one point, bogeyed Nos. 8, 10, 11 and 12 and wasn’t a factor after that.

When Chun made her first birdie of the day at the par-5 11th, Thompson answered with a birdie of her own to remain two shots ahead at 7 under. When Thompson bogeyed No. 12, so did Chun.

The 16th hole, where Chun took an unplayable lie and a double bogey the previous day, was the turning point in her favor in the final round. Thompson was just short and right of the green in two shots but took four from there to make bogey, while Chun rolled in her birdie putt after a long wait.

Lee, who trailed by six at the start of the day, just missed an eagle putt on No. 16 that could have tied her for the lead. When Thompson birdied the 15th and Lee bogeyed the 17th, the Australian was three behind.

A terrific approach on the final hole gave Lee a short birdie putt, but after making that, she still needed Thompson to drop two more strokes.

That actually happened, but Chun’s birdie and two pars on the final three holes were enough to win.

“I never really felt too out of it after turning at even par after nine,” said Lee, this year’s U.S. Women’s Open champ. “I thought if I can make one or two birdies coming in, then I might have a chance.”

Chun has spoken in the past about battling depression, and she became emotional after this victory when discussing a recent conversation she had with her sister.

“I really cried. I said, ‘I’m really hard to stay in the U.S.,’” Chun said. “She said, ‘In Gee, just quit golf. You’re the important thing.’ … When I heard what she said, I don’t want to — I didn’t want to quit the golf. Then I believe I still have a spirit, and I saw, In Gee, you still want to play golf.”

“So I am trying to really hard this week,” she added. “I’m just so happy to make win after all that happened.”

NOTES: Chun won $1.35 million after the prize money for this event was doubled. … Defending champion Nelly Korda (75) finished tied for 30th.

___

Follow Noah Trister at https://twitter.com/noahtrister

___

More AP golf: https://apnews.com/hub/golf and https://twitter.com/AP_Sports