Miller, who improved to 3-6 with the victory, was one out shy of a complete game and needed the relief of Matt Milke on the mound to seal the upset with the bases loaded.

BYU improved to 21-17 overall and 8-7 in the West Coast Conference, while Gonzaga is now 28-14-1 and 15-6. It was the fourth upset by BYU this season over ranked teams (beat No. 2 LSU and twice defeated No. 21 Cal Irvine).

"We showed a ton of character in the way we approached the game today," BYU coach Mike Littlewood said. "It would have been easy to pack it in, but our team came out with a lot of energy for this game. I can't say enough about Adam Miller's performance. He (Miller) had that 'Desmond Poulson attitude' today in that he wasn't going to let anybody beat him. If it weren't for his high pitch count, I probably would have left him out there to finish the game. He was crisp, and I love to see that from Adam. He was ready to go today."

Miller said he knew this game was important to him and the team.

"It was a must-win game for us and I knew that," Miller said. "I felt my curve ball got stronger as the game went along. I just tried to pitch them inside and not let them get extended with all the lefties they had in their lineup."

The pitching duo of Miller and Milke, who recorded his third save, received plenty of help from the likes of Brugman, Whitney and several other teammates.

"Adam (Law) came up with a big hit to get us on the board," Littlewood said. "I loved our attitude coming out before the game. We talked about having a short memory and moving on to the next game. He (Gonzaga pitcher Arturo Reyes) threw his slider a bit too often, and I’m proud of our hitters for plugging away."

In the fifth, Hannemann led off with a triple and scored off Trace Hansen’s single. Then Brugman popped a two-run homer to left field that appeared to glance off the glove of the Gonzaga outfielder, increasing BYU’s lead to 8-1. Brugman pounded a two-out homer over center, his second round-tripper of the day and seventh of the season, to put BYU up 9-5 in the ninth.

"On a normal day it probably would have been a warning track out," Littlewood said of Brugman's first home run.

Littlewood also said this win was needed in hopes of getting a WCC playoff spot.

"To me this was a do-or-die win," Littlewood said. "One of the top four spots in our league is within our grasp now."

The Cougars next play Tuesday night at Utah Valley University, before returning to WCC action, when a three-game series starts Thursday at Loyola Marymount University.