Hayes hit a two-run home run in the second. It came after Dylan Davis walked to open the inning. The home run opened the Beavers' scoring and sent Oregon State to its 12th consecutive victory, which is tied for the longest active streak in the nation.

The Beavers improved to 41-8 on the year with the win and are 20-4 in Pac-12 Conference play. Stanford, meanwhile, is 26-20 overall and 11-13 in conference games.

Oregon State held off a late Stanford rally as the Cardinal scored two runs in the eighth and had runners on the corners with no outs. Kavin Keyes, however, started a double play that first recorded an out at second. Andy Peterson, the OSU second baseman, then threw to catcher Nate Esposito, who made the tag on Austin Wilson and held on to the ball as the runner attempted to jar it loose.

Scott Schultz, on to close, then got Alex Blandino swinging to end the inning. After getting out of the jam, Schultz went on to a perfect ninth for his 10th save of the season.

Wetzler won his sixth straight game to improve to 6-1 on the year. The lefty threw 88 pitches and struck out five with one walk. The outing was Wetzler's sixth consecutive quality start and 18th in a row for Oregon State in Pac-12 play.

Oregon State managed just three hits in the win but took advantage of nine walks, four hit batsmen and five Stanford wild pitches.

The Beavers tacked on insurance runs in the fourth and fifth innings. Hayes scored on a wild pitch in the fourth, then drove in the first run of the fifth when getting hit by a pitch with the bases loaded. Kavin Keyes drove in the inning's second run with a short sacrifice fly to left.

Those insurance runs came in handy as Stanford pulled to within three with a two-run sixth inning. Brian Ragira drove in the first run on a fielder's choice and reached second on a throwing error. He was the driven in by a single off the bat of Austin Wilson.

Stanford's Sam Lindquist made his first career start and lasted four innings, throwing 79 pitches in the process. He allowed just two hits but gave up five runs to take the loss. He dropped to 2-2 on the year.