After going to bed with the lead for three straight nights, Patty Tavatanakit was never going to look back.

Tavatanakit, the 21-year-old rookie from Thailand, shot a 4-under 68 and completed a wire-to-wire victory on Sunday at the ANA Inspiration, the LPGA's first major of the season, at Mission Hills Country Club in Rancho Mirage, California.

By finishing at 18 under for the event, Tavatanakit (66-69-67-68) outlasted a furious charge by Lydia Ko, who set a women's major record with a final-round 62. Ko settled for second place at 16 under.

Tavatanakit is the first rookie to win the Inspiration since 1984, and the first LPGA player to make the Inspiration her first career victory on the tour.

READ | Jordan Spieth ends four-year title drought with win at Texas Open

"I just wanted to be done since this morning," Tavatanakit said. "Didn't get a lot of sleep last night, but I meditated twice this morning and just (stayed) patient. It was gonna be hard out here. I knew I gotta be really strong mentally."

Tavatanakit, who entered the final round with a five-stroke lead, chipped in for eagle on the par-5 second hole. She added birdies on holes 8 and 12 on her way to a bogey-free round.

Meanwhile, playing several holes ahead of the leader, Ko lit up the course. A birdie-eagle start to her round propelled the New Zealander to a 29 on the front nine, a new nine-hole scoring record for the event often likened to the LPGA's Masters.

ALSO READ | Patty Tavatanakit opens 5-shot lead at ANA Inspiration

By the 11th hole, Ko had drained seven birdies and an eagle to threaten Tavatanakit's lead, but she finished with just one birdie over her final seven holes.

Ko, 23, won the Inspiration in 2016 and was seeking her third major title.

For her part, Tavatanakit did not engage in scoreboard-watching, saying she did not know how Ko had performed.

"At no point," Tavatanakit said. "No, not even on the 18th."

Four players tied for third at 11 under: American Nelly Korda, Nanna Koerstz Madsen of Denmark, Sei Young Kim of South Korea and Shanshan Feng of China.

One stroke behind in a tie for seventh were seven-time major winner Inbee Park and Jin Young Ko, both of South Korea, and Ally Ewing of the U.S.

ALSO READ | Spieth, Wallace share lead entering Valero Texas Open final round

Before the Inspiration, Tavatanakit's best finish of the season was a tie for fifth at the Gainbridge LPGA in February.

On Sunday, she joined the long line of women to partake in the tradition of Inspiration champions to celebrate by jumping into Poppie's Pond next to Mission Hills' 18th green.

"It feels great to be a major champion," Tavatanakit said. "It still hasn't really sunk in yet, the fact that I just turned 21 six months ago and now I'm a major champion on my rookie year. Just crazy."