BERKELEY, Calif. — This time Justin Herbert took a knee.

The Ducks survived another second-half comeback bid by a Bay Area rival, which included a throwback performance that had Joe Kapp smiling somewhere, to notch the program’s first Pac-12 road win since 2016.

“Do we sing or do we not sing?” coach Mario Cristobal wondered.

No. 19 Oregon, which squandered a 17-point halftime lead and a 10-point lead late in regulation during the deflating 38-31 overtime loss to Stanford, did sing the school fight song after it rebounded with a 42-24 victory over No. 24 California on Saturday night at Memorial Stadium.

The Ducks (4-1, 1-1), who were 0-4 in conference road games under Willie Taggart, will have a bye before hosting No. 11 Washington on Oct. 13 at Autzen Stadium.

“There kind of comes a point in time for every team to either grow up or not,” Cristobal said.

Herbert, two years after leaving the field here in tears after a devastating double-overtime loss, has certainly blossomed into a leader.

With a dozen NFL scouts watching from the press box and Los Angeles Rams quarterback Jared Goff watching from the sideline, Herbert put on a next-level performance to set the tone.

The 6-foot-6, 240-pound junior loosened up Justin Wilcox’s stout defense, completing 16 of 22 passes for 225 yards and two touchdowns. That helped the offensive line make another statement in the running game as the Ducks finished with 260 net yards and two touchdowns on the ground.

“That’s one of the better coaches you’ll find and he had his team prepared,” Cristobal said of Wilcox, the former Oregon defensive player who is in his second season as Cal’s head coach. “To come on the road and to be able to do that is a monumental, powerful shift for our team and our program to be able now to get something like that accomplished. It’s been a while.”

It was Oregon’s first win in Berkeley since Nov. 10, 2012 (59-17) and its first road win over a ranked team since Herbert threw a last-second touchdown pass to deliver a 30-28 victory at No. 11 Utah on Nov. 19, 2016.

“I’m really proud of them and really happy for them,” Cristobal said.

After Oregon built the 25-point lead, Patrick Laird rushed for a 10-yard touchdown for the Bears (3-1, 0-1).

Then Travis Dye lost a fumble, a week after CJ Verdell’s costly turnover with 51 seconds left in regulation against Stanford.

But true freshman safety Jevon Holland bailed out his classmate with an interception in the end zone to give the visitors a little momentum back.

“Travis has done a great job since he has gotten here,” Cristobal said of Dye, the younger brother of junior linebacker Troy Dye. “That’s a pretty good bloodline of football players I would say. They know how to play and they can be trusted in clutch situations.”

After Adam Stack missed a 41-yard field goal, Oregon’s defense came up with a stand on fourth-and-goal from the 1-yard line as Troy Dye tackled McIlwain for a 2-yard loss with 14:10 remaining.

Travis Dye finished with 115 yards and a touchdown, and Verdell added 106 yards.

“Oregon came out ready to play,” Cal defensive end Rusty Baker said. “They are a great team.”

Cal did finish off a seven-play, 97-yard drive with a 1-yard touchdown pass from Brandon McIlwain to wide receiver Jordan Duncan to make it a two-possession game (35-24) with 4:31 remaining.

The ensuing onside kick skipped out of bounds, but Oregon’s offense went three-and-out after burning just over a minute off the clock.

Safety Ugo Amadi sealed the win with a 32-yard interception return for a touchdown with 3:02 remaining.

“We had a lot of opportunities,” McIlwain said. “As a whole, we didn’t operate how we wanted to. We missed some of our shots. You have to give Oregon credit, they played extremely hard.”

McIlwain rushed for 123 yards and a score. He is Cal’s first quarterback to rush for over 100 yards in a game since Kapp ran for 130 yards in a win over Oregon in 1958.

“I knew exactly what he was about. He hit us on some big runs,” Cristobal said. “They probably ran the ball better than most teams did against us but there’s a give and take. Overall the defense played a real strong game.”

Travis Dye went for a 45-yard touchdown run in the second quarter to give Oregon a 14-10 lead.

Herbert completed a 33-yard pass to Jaylon Redd down the Oregon sideline and a 36-yard touchdown pass to Dillon Mitchell down the opposite sideline to extend the lead to 21-10.

After a 73-yard punt by Steven Coutts, Herbert was unable to lead the Ducks on a 90-yard backbreaking drive.

But then outside linebacker La’Mar Winston returned a fumble by McIlwain for a 61-yard touchdown with 13 seconds left in the first half to give Oregon a commanding 28-10 lead.

“I think it’s pretty clear,” Wilcox said of the difference in the game. “Offensively, it starts with turnovers. You can’t turn the ball over that many times against a team like that.”

Herbert completed all four of his pass attempts on Oregon’s first drive and threaded the needle to tight end Kano Dillon for a 30-yard touchdown to give the visitors a 7-3 lead in the first quarter. He also found emerging star wide receiver Dillon Mitchell for a 36-yard touchdown, giving him six career touchdown passes in two games at Cal.

This time Oregon’s quarterback and his teammates were singing in the postgame locker room instead of wiping away tears from a stinging defeat.

“Justin continues to elevate his game,” Cristobal said. “He sees the whole field, he’s a great decision maker, he does not get duped. And tonight was going to be a challenge.”