After Wednesday's statement win over USC, the script has been revised. Almost predictably, for a program that has traditionally saved its best tennis for late in the season.

Even hosting duties in the NCAA's early rounds  typically reserved for teams seeded among the top-16 and seemingly an annual occurrence on The Farm  appeared in jeopardy.

One month ago, the Cardinal was fifth in the Pac-12 standings and in danger of dropping outside the top-20, uncharted territory for a 17-time NCAA champion and the most storied program in the sport.

Stanford captured its 25th conference crown overall and first since 2012, while locking up an automatic NCAA bid in the process.

The 13th-ranked Stanford women's tennis team has faced deficits all year. It was no different Wednesday as the Cardinal rallied past No. 19 USC, 4-2, to win the Pac-12 title in Ojai, site of the conference championships.

Carol Zhao, who ironically would have been unavailable when the teams were scheduled to meet back in March, followed with a 6-4, 6-2 triumph over Giuliana Olmos in a battle at the top spot.

Zoe Katz took a 6-4, 6-1 win over Caroline Doyle at the No. 3 spot, to extend USC's lead, 2-0. The score was slightly misleading though, with Stanford starting to control the remaining matches.

USC's early edge did little to rattle Stanford. After all, in its two biggest wins of the season against No. 7 Florida and No. 1 California, the Cardinal also lost the doubles point before prevailing 4-3.

The neutral-site match became necessary to determine the Pac-12 regular season champion when the Cardinal beat previously unbeaten California. The March 11 contest against the Trojans was cancelled due to rain.

Despite losing the doubles point and later staring at a 2-0 deficit, Stanford (14-5, 9-1 Pac-12) dominated singles play and used contributions from throughout its lineup to dispatch USC (12-5, 7-1 Pac-12).

Hardebeck was one game away from her 16th consecutive victory when the match was suspended.

From that point, it was simply a race to clinch between Caroline Lampl and Krista Hardebeck, both of whom were in the driver's seat during their third sets. Lampl eventually finished it off, outlasting Jessica Failla 4-6, 6-1, 6-3 for her team-best sixth clincher of the season and second in as many matches.

A key point followed on court six, where Melissa Lord produced arguably the biggest win of her rookie campaign by defeating Rianna Valdes 7-5, 7-6 (1). Lord, who entered the match at 15-11 overall but having beaten only one other nationally-ranked player, put Stanford ahead 3-2 in an important swing match at that juncture.

The 2015 NCAA Singles runner-up and three-time All-American, Zhao missed the entire fall and much of the spring as she had been training with the Canadian National Team and competing in pro tournaments. Stanford is now 8-1 with Zhao in the lineup and 6-4 without her.

Stanford will next host and compete in the NCAA Regionals, May 5-7 at Stanford Golf Course. Eighteen teams and six individuals will play for berths in the NCAA Championships, May 20-25 at Eugene Country Club in Eugene, Oregon. Stanford is the defending national champion.

Following play, all-conference selections were announced. Kim and Stackhouse garnered All-Pac-12 honors for the fourth-consecutive year. Stackhouse made the first team for the fourth-straight season, while Kim accomplished it for the second year in a row.

Walker was pleased with the comeback by Danielson, and the overall play of Kersten. The latter competed for only the third time in her collegiate career and contributed each day.

Kim paced the Cardinal with a tie for 20th at 1-over 217, 12 strokes behind medalist Linnea Strom of Arizona State. It marked Kim's sixth top 20 showing of the season.

The Trojans won the team title, combing for a conference-record 18-under score of 846. The Cardinal concluded at 7-over 871, shooting 2-over 290 on Wednesday in the best four out of five player scoring.

"We don't feel that disappointed," said Margot and Mitch Milias Director of Women's Golf Anne Walker. "We play in a tough conference. It's the nation's best. If you play average, you're going to finish seventh."

Danielson posted her best round of the 54-hole event with five birdies and three bogeys to shoot a 2-under 70. The steady Kim made two birdies and only one bogey to record 71.

Junior Casey Danielson and senior Lauren Kim closed with under par rounds Wednesday to help sixth-ranked Stanford finish seventh in the Pac-12 Championships at Ruby Hill Golf Club.

Stanford has produced 11 conference singles champions but is seeking its first since Kristie Ahn (2011) and Nicole Gibbs (2012) went back-to-back.

Follow Palo Alto Online and the Palo Alto Weekly on Twitter @paloaltoweekly , Facebook and on Instagram @paloaltoonline for breaking news, local events, photos, videos and more.

Stanford women capture the Pac-12 tennis title