SCOTTSDALE, Ariz. -- Stanford freshman Rose Zhang stood just short of the 17th green, the ball resting a few feet away in the rough as she tried to close out a tight match.
Oregon's Sophie Kibsgaard Nielson wheeled past Zhang while lining up her next shot and accidentally rolled over the ball with her push cart, incurring a one-shot penalty.
A bizarre sequence, but it had little to do with the outcome. Zhang was going to wrap up the national championship either way.
Zhang closed out Kibsgaard Nielson with a two-putt par, and Stanford beat Oregon 3-2 on Wednesday for its second national championship.
"It turned out regardless of that penalty shot I was able to secure it, but it definitely lightened a lot of pressure on that hole," said Zhang, who won the NCAA individual title Monday. "It really sucked for it to end that way. It was just unawareness by Sophie, but I didn't think much of it."
The Ducks lost the first two matches, then rallied to win the next two, leaving it up to Zhang and Kibsgaard Nielson on Grayhawk Golf Club's Raptor Course.
Leading 2 up, Zhang hit her tee shot into the rough short of the par-4 17th, and Kibsgaard Nielson, looking ahead to her next shot, rolled over it with her cart.
Had it been stroke play, Zhang would have just replaced her ball with no penalty. In match play, Kibsgaard Nielson was hit with a one-stroke penalty.
It didn't matter.
Kibsgaard Nielson needed to win the hole, and even without the penalty, she only would have had a par. Zhang two-putted from about 60 feet for par, sinking a 5-footer for the Pac-12's unprecedented 200th women's NCAA title across all sports.
"I reminded Rose that no one ever wants a tournament to end that way, but it didn't," Cardinal coach Anne Walker said. "At the end of the day, Sophie made five, Rose made four and I want that for both Sophie and Rose to be the focus because no one wants a title to end that way."
Stanford has been one of the nation's best programs since Walker took over in 2012, yet has struggled at times to finish off strong.
The Cardinal won the 2015 title, but lost to Washington in the title match the next season and finished tied for third the next two years. Stanford lost in the quarterfinals the past two seasons, the last one as the No. 1 seed.
The Cardinal had to grind out wins over Georgia and Auburn on Tuesday, but appeared to be cruising to their second national title.
Stanford led four of the five matches early, then Brooke Seay beat Ching-Tzu Chen 4 and 3 in the opener. Aline Krauter gave the Cardinal a 2-0 lead with a 5-and-3 victory over Hsin-Yu Lu.
Then things started to get tight.
Tze-Han Lin beat Rachel Heck 4 and 3, giving Oregon hope with two close matches still on the course.
Briana Chacon, down two with four holes left, tied her match after Sadie Englemann couldn't get up and down from in front of the green on 17. Chacon hit her second shot on the par-5 18th into the greenside bunker and made the 15-foot birdie putt to win 1 up, pulling the Ducks even.
"We did not play good golf in the start of this," Oregon coach coach Derek Radley said. "We were a little timid, just for the moment, but I never count my Ducks out and, man, did we give it a run at the end."
Zhang appeared as if she would dominate the closing match, just as she did in winning the individual title. She won the first two holes and led 3 up through 11. But Kibsgaard Nielson kept her close, chipping the lead down to one with birdies on Nos. 12 and 14.
Zhang went back 2 up with a birdie on the par-4 15th and barely got her ball onto the front of the green from the rough on No. 17. With the penalty on Kibsgaard, Zhang only needed three putts to close out the match and got it down in two, sending Cardinal players charging onto the green in celebration.
"No words can describe it," Zhang said. "That was the most incredible moment of my life."
The Ducks, despite coming up short in the title match, took huge strides in their fourth season under Radley.
Oregon won the Pac-12 championship for the first time -- Hsin-Yu was the individual champion -- and claimed its first NCAA regional. The Ducks then rolled through San Jose State and Texas A&M on Tuesday to reach their first NCAA title match.
"This was the dream, this was goal," Radley said. "We wanted to get to this stage. That's a special group."