Stanford head coach David Esquer liked the situation. Will Matthiessen’s two-run homer had tied the score 5-5 in the ninth inning of the regular-season finale at Washington on Saturday.

Later in the inning, the Cardinal had the bases loaded with two outs.

“If it had to come down to this,” Esquer said he was thinking. “I’m completely happy with whatever happens.”

That’s because Nico Hoerner was at the plate. The junior shortstop is expected to be a high pick in next week’s MLB draft not just because of his .349 average and his slick fielding. It’s because of his will to succeed.

Sure enough, he beat out a slow roller to third base, and the decisive run scored in a 6-5 win that gave the Cardinal their first Pac-12 title since 2004.

“Nobody wants to win as much for the team as much as Nico does,” Esquer said. “I’ve had a lot of great players but haven’t had as good a team player who was really willing to accept all his personal results with the one focus being on: ‘I just want this team to win as many games as possible and do what I can to help them win.’”

The Cardinal (44-10, 22-8 Pac-12) enter postseason play this weekend with high hopes. They’re the No. 2 overall seed in the NCAA field and the top seed in the regional at Sunken Diamond.

They play Horizon League champion Wright State (39-15, 22-6) at 7 p.m. Friday. Baylor (36-19, 13-11 Big 12) meets Cal State Fullerton (32-23, 18-6 Big West) at 2 p.m. The losers play at 3 p.m. Saturday and the winners at 8 in the double-elimination format.

Hoerner said he had lofty expectations for the Cardinal from the start of practice.

“When you have a core of two starting pitchers (Tristan Beck and Kris Bubic) that can beat anyone in the country, then you give yourself a chance to win,” he said. “We returned pretty good strength in the middle for our defense.”

That said, he lost his double-play partner, second baseman Duke Kinamon, to an injury just before the first game. “To see someone that you respect so much like that go down is really hard to see,” Hoerner said.

The Cardinal later lost right fielder Brandon Wulff and catcher Maverick Handley to injuries. Wulff returned recently, although Handley remains sidelined. Despite the setbacks, Stanford continued to win.

“It speaks to the character of the team and to the coaching staff for having everyone prepared and for having us believing in each other,” Hoerner said.

He comes from an academic family. Hoerner’s father, Fred, teaches English at Bentley School in Lafayette. His mother, Keila Diehl, a Stanford grad, teaches East Asian studies at Cal. They named him Nicholas, but neither liked the nickname Nick. So when a family friend started calling him Nico when he was 3 or so, it stuck.

To say he stood out in baseball at Head-Royce School in Oakland would be a gross understatement.

“Nico was one of the kids who was so rare,” coach Mike Talps said. “I’m not even sure he enjoyed high school baseball. He was so good and had such good instincts for the game, it was like playing against kids 6 years younger.

“Yet he was the consummate team player, never thinking about his own stats. It was always about getting the team to the next level. He was an outstanding leader.”

He added Hoerner “had the most insane work ethic of anybody I’ve ever been around.”

Hoerner insists he enjoyed high school ball mainly because it was “a chance to play with some of my best friends.”

Discussing Hoerner’s chances of reaching the big leagues, Esquer said, “It’s not an if. It’s a when.”

Esquer honored: On Thursday, the Pac-12 named Esquer its Coach of the Year in a voting by his peers. Esquer also won the award in 2001 while at Cal. He spent 18 seasons with the Bears before joining Stanford, his alma mater, after last season.

Tom FitzGerald is a San Francisco Chronicle staff writer. Email: tfitzgerald@sfchronicle.com Twitter: @tomgfitzgerald