In survive-and-advance mode this late in the season, it doesn’t always have to be pretty. Just win your clunkers.

New Mexico State gave the No. 3 national seed Oregon State Beavers all they could handle Friday night to open play for the Regional hosts, getting standout pitching from Ian Mejia through the first six innings, but the Beavers (45-15) took advantage of Aggie mistakes in the 10th frame to walk away with a 5-4 walk-off win.

Ryan Brown fanned two in the top of the 10th to put the Beaver offense back on deck with the score tied at 4-4. After an eight-pitch lead-off battle from Gavin Logan that ended in a foul-out to left-field, things fell apart for the Aggies.

Travis Bazzana drew a one-out walk as Aggie pitcher Alex Bustamante missed on four of his next five pitches. With Jake Dukart at the plate, Bazzana stole second shortly thereafter. Then New Mexico State elected to intentionally walk Dukart. Two on, one away.

After a two-pitch fly-out from Matthew Gretler, Bustamante missed four straight to walk Jabin Trosky and load the bases. Four pitches and four called balls later, Justin Boyd was on his way to first, Bazzana on his way home, and Oregon State on its way to the winner’s bracket.

No doubt, there was controversy as it relates to the officiating. Much of the discussion after the game was dominated by the performance of the umpire behind home plate, with many questioning not just the last four balls but several at-bats throughout the game.

Oregon State will take it.

Garret Forrester drove in a pair of runs—one in fifth and one in the seventh—on a 3-for-5 night to help power the offense. Gretler also finished with a multi-hit game.

Brown (5-1) earned the win for Oregon State while putting in one inning and a third of scoreless work. He struck out three as he, starter Cooper Hjerpe, and Ben Ferrer combined for 14 strikeouts. Hjerpe struck out 10 while scattering two hits and three runs in six innings and two-thirds. With double-digit punch-outs on the evening, Hjerpe moved into seventh place in program history for career strikeouts (264) and moved within nine of tying the single-season program record (159).

Bustamante (1-3) took the loss for New Mexico State (24-33) after allowing one run and one hit in two innings and a third. All four of his walks came in the 10th and final frame.

The Beavers stay on the winner’s side of the bracket. They’ll take on San Diego Saturday night at 7 p.m. PT on ESPN2.