In-Kyung Kim crouched and grimaced when the ball stopped on the edge of the cup on her final hole. Moments later, she couldn't hide her smile.

Kim finished with a flourish Sunday, birdieing two of her final three holes to beat Hall of Famer Se Ri Pak by a stroke in the State Farm Classic.

Kim shot a 7-under 65 to finish at 17-under 271, giving the South Korean her second LPGA Tour victory along with a big boost heading into the LPGA Championship next week at Bulle Rock. In the process, she denied Pak (66) her first win in two years.

"Yeah, this tournament means a lot to me, playing with all the great players that all played this week," Kim said. "I feel really special, yeah."

Hee-Won Han (65), Jee Young Lee (66) and Angela Stanford (67) finished at 15 under, and third-round co-leader Cristie Kerr (70) was 14 under along with Eun-Hee Ji (63), Paula Creamer (65), Suzann Pettersen (68), Ai Miyazato (68), Amy Hung (68) and Jiyai Shin (70). Michelle Wie tied for 54th at 4 under, following a third-round 77 with a 69.

But in a star-studded tournament that featured 49 of the top 50 money winners, Kim's finish gave her the $255,000 first prize _ and a pretty good birthday present. She turns 21 next week.

On a windy, cloudy day that included a few rain drops, Kim appeared unfazed by everything.

She was at 15 under before burying back-to-back birdies on the par-5 16th and par-3 17th, and nearly made it three straight at the 18th when her 13-foot putt stopped on the edge of the cup. She crouched in agony, then tapped in for par and tossed the ball toward the bleachers in celebration.

Right after she walked off the course, play was suspended for 20 minutes because of lightning, but it was already clear that she was going to win even with two groups still on the course.

"My game was pretty ready," said Kim, who won the Longs Drugs Challenge last year and was second last month in the Michelob Ultra Open. "I can't control winning, so I have to play my best."

For much of the afternoon, Stanford and Pak were poised to pull out the win leading up to the season's second major.

"I think this was a great warmup to next week," Stanford said.

Stanford was at 16 under through 13 holes before bogeys at 14 and 15, and Pak _ tied for the lead through each of the first two rounds _ was at 16 under after a birdie on the par-5 16th, narrowly missing an eagle.

But instead of leaving Panther Creek with her first victory since the 2007 Jamie Farr Classic, Pak had to settle for second.

"Of course, I like to win," she said. "Of course, I'm trying real hard. But I'm really happy for her. But at the same time, I'm really happy about this week."

Considering where she was not too long ago, she'll take this. Pak said she was not in the right place mentally, was frustrated, but she was more relaxed this weekend. She had fun, and maybe, career win No. 25 will come soon.

"I know it's been there before," she said. "No rushing. I still have many years to go until I want to quit. I'm still loving the golf, want to play golf."

While Pak showed she can still compete with the game's best, another South Korean emerged to top the crowded leaderboard.

Kim, who was two strokes off the lead through three rounds, couldn't help but glance at the scores as she climbed toward the top. Then again, she pointed out, "Every hole has a scoreboard," so they were easy to track.

When she saw that Pak, who was in the group ahead of her, birdied 16, Kim knew what she had to do.

"I had to make birdie on 16," she said.

She did just that and buried a short uphill putt on 17 for another birdie, and when her second shot on 18 hit the green, Kim knew she was in good shape.

"I couldn't wait to finish," she said. "I was ready. I was like, 'I want to hit.'"

That near birdie on 18?

"I was more excited than frustrated," she said. "I tried my best all week. I putted it right. It broke in the end more than I thought. I can't complain."