CORVALLIS, Ore. (AP) -- Oregon's Garrett Sim thanked the Oregon State fans after the game for the fuel that sparked him in his final appearance in the hardwood version of the Civil War.
The senior guard was booed by Gill Coliseum fans every time he touched the ball Sunday after a first-half confrontation with Beaver players in front of the Oregon State bench.
The extra noise didn't seem to matter at all to Sim, who scored a season-high 25 points to help Oregon hold on for a 74-73 win.
"This is probably the most fun I've had in a game in my career," Sim said. "It was a team effort, and everybody made plays down the stretch."
Devoe Joseph and Olo Ashaolu added 16 points apiece for the Ducks (20-8, 11-5 Pac-12) in the rivals' 337th meeting, the most contested series in college basketball.
Ahmad Starks had 18 points and Angus Brandt 16 for the Beavers (15-13, 5-11), who have lost five of their last six.
The win was extra special for Sim, whose parents Tim and Amy and brother Brennan all attended Oregon State. Tim and Brennan were Oregon State athletes, and Garrett grew up a Beavers fan. But he didn't get much recruiting attention from Oregon State while at Portland's Sunset High School.
"Every time I come in here, there's a chip on my shoulder," Garrett Sim said. "There's a lot of history with me and Oregon State, so it's very fun for me to come in here and win."
Oregon State came back from an 10-point deficit in the last four minutes, cutting the margin to two on Devon Collier's basket off a rebound with 41 seconds remaining. Ashaolu was fouled on a teammate's missed shot and made one of two free throws with 9.9 seconds left, giving Oregon State one last possession with an opportunity to tie.
Challe Barton missed a 3-pointer, and the Beavers' Jared Cunningham followed with a dunk for the game's final score.
Sim made 10 of 14 shots from the floor, including 4 of 7 from 3-point range, helping Oregon keep alive its hopes of reaching the NCAA tournament.
"On Feb. 26, you've got to find ways to win games," Oregon coach Dana Altman said. "I thought we played very hard. We were fortunate. We found a way to win the game."
Oregon shot 27 of 61 overall (44.3 percent), while Oregon State was 26 of 57 (45.6 percent).
Consecutive 3-pointers early in the second half by Brandt gave Oregon State a 46-42 lead. Oregon came right back, with a Sim 3-pointer capping an 8-0 run. Later, Joseph scored five straight in a 7-0 run for a 59-51 Ducks lead.
Oregon took its biggest lead of the game, 66-56, on a Joseph 3-pointer with 5:49 left.
A missed dunk by Oregon's Carlos Emory was followed by a Starks 3-pointer with 2:02 left that capped an 8-0 Oregon State run that made it 71-68 Ducks.
"I think what it came down to was intangibles ... loose balls, rebounds you have to get," Oregon State coach Craig Robinson said, noting the play in the closing seconds that sent Ashaolu to the free-throw line.
Cunningham, averaging a Pac-12-leading 18.6 points entering the game, finished with 13.