CORVALLIS -- Oregon State's Luke Heimlich let his pitching speak for itself in record-setting fashion to open the Civil War.

Then he opened up about how it felt to become the Beavers' all-time strikeout king.

Backed by home runs from Trevor Larnach and Tyler Malone, the senior left-hander struck out 12 and held Oregon to four hits and two runs over 7 1/3 innings in a 5-2 victory for No. 10 Oregon State before a record crowd at Goss Stadium on Thursday night.

It was the Beavers' fifth consecutive win over the Ducks.

When Heimlich fanned Evan Williams in the third inning for his seventh strikeout of the game, it also was the 300th of his career to surpass Jonah Nickerson's OSU record from 2004-06.

"It's pretty fun," Heimlich said. "I really wasn't aware of it until earlier this week, but it's pretty cool."

Heimlich (9-1), who had a career-best 13 against Washington earlier this season, now has 305 strikeouts and is the current Pac-12 leader with 79.

"For me, that's awesome because I've had some great ones," OSU coach Pat Casey said. "I'm happy for Luke. I think that's really neat for him."

Now with 29 career wins that rank third on that OSU list, Heimlich wasn't expected to open for the Beavers (27-6, 8-5 Pac-12) on one day's fewer rest with junior right-hander Bryce Fehmel available, but Casey said he and pitching coach Nate Yeskie give their ace the freedom to decide when he's good to go.

"He feels like he's a front-line guy," Casey said, "He feels like the Friday night guy, and he likes throwing the first game."

Heimlich started off in total command, striking out seven of his first nine batters. OSU led 2-0 when the Ducks (19-16, 6-10) nicked him for an unearned run in the third inning on a walk to Ryne Nelson, Heimlich's errant pickoff attempt and Kyle Kasser's single.

Oregon's other run came in the seventh after Heimlich hit Gabe Matthews with his first pitch, and he came around to score on Ray Soderman's single to make it 5-2.

Otherwise, Heimlich was lights out, walking just one and throwing 113 pitches before yielding to reliever Dylan Pearce after Kasser beat out an infield single in the eighth. Jake Mulholland pitched the ninth for his 10th save.

"I was able to get ahead (in the count)," Heimlich said. "They were an aggressive team, but I was able to kind of keep filling up the zone, and as long as I was winning the bottom, I was able to get them out.

"Mainly my fastball and my slider was going off of it, I was able to throw the slider down in the zone and get them to chase it if I'd already established it."

OSU also had its captain back, junior second baseman Nick Madrigal, for the first time in 26 games since he broke his left wrist nearly eight weeks ago in Arizona. After popping up to right in his first at-bat, Madrigal singled to right to drive in Steven Kwan in the second inning for a 2-0 lead.

Among the announced crowd of 3,692, a regular-season stadium record, were several members of Madrigal's family, including his parents.

"It was awesome," he said. "They love coming up here and they haven't been here in a while since I've been out, but they love cheering on the Beavers, they love this atmosphere. It was great seeing them in the stands."

Larnach answered Oregon's run in the third by leading off with an opposite-field home run over the 14-foot fence in left for a 3-1 lead. It was his third homer in as many games and his 11th of the season.

Two innings later, Malone also connected for the third time in three games, cranking a two-run blast off the scoreboard at the 365-foot mark in the right-center field gap to put the Beavers up 5-1.

That helped to chase UO starter Matt Mercer after five innings, his shortest stint of the season. The junior right-hander gave up eight hits and five runs, all earned, with six strikeouts and three walks.

"Right down the middle," Mercer said of the pitch Malone crushed. "It was supposed to be an inside pitch, inside fastball, and I didn't get it in."

Oregon coach George Horton said it looked the same way from the Ducks' dugout.

"That was a crummy pitch," he said. "It was a belt-high two-strike pitch, and Malone did a nice job with it. When he got ahead, he let them back in the count by nibbling instead of putting guys away."

The Beavers' approach to the Civil War was that it was just another Pac-12 series. However, the Ducks, and Mercer in particular, may have put a bit too much emphasis on it, their coach said, having lost four of their last five games.

"One of the things that happens to you in a rivalry is you start to try too hard," Horton said. "I don't know if the emotions of it. ... (Mercer) should know better. He has pitched good here at Goss before.

"I don't know if it was his mechanics or his emotions, but he certainly wasn't sharp, and they were really sharp early."

Casey will go with Fehmel (4-1, 3.83 ERA) in the second game at 4:05 p.m. Friday. He's coming off an abbreviated start of only 27 pitches a week ago in a suspended game at Missouri State.

Oregon is expected to counter with sophomore right-hander Kenyon Yovan (3-1, 2.59), a converted closer who was 1 for 4 with a double off Heimlich as the Ducks' designated hitter.

-- Ron Richmond for The Oregonian/OregonLive