STANFORD, Calif. -- No. 12-ranked Stanford brushed off the rust after a 15-day layoff, beating visiting UC Davis 3-2 behind a two-run home run by Tyler Gaffney on Monday evening.

Gaffney's homer proved to be the difference, as following a lead off walk in the fourth, he connected on a two-run shot to left to make it 3-0 of reliever Anthony Kupbens.

Chris Reed twice stranded a runner in scoring position, striking out pinch hitter Seth Batty for the final out of the game following a two-out double by Scott Heylman to earn his second save of the season. Reed came on and pitched a perfect eighth after entering following a leadoff walk by Jordan Pries. Reed got two strikeouts and a foul pop up to send it to the ninth.

Pries worked the middle five-plus innings of relief after Mark Appel (1-2) got the win after a predetermined first two innings.

UCD (3-13) got back into the game with a two-out, two-run single by Daniel Cepin in the fifth to make it 3-2. Pries then worked out of a two-out jam in the sixth, getting a called strike three to keep it at a one-run game. Pries struck out two more in the seventh.

Stanford (7-5) scored the first run of the game in the first off a Kenny Diekroeger RBI groundout off of loser Scott Lyman (0-1) in the first.