BERKELEY, Calif. — Rich Rodriguez came to Northern California expecting his team to have to deal with some adversity.

He walked out of Memorial Stadium late Saturday afternoon with his voice a little hoarse, some players banged up and his football team exhausted.

But he also left Cal with something much more important — a win.

The Wildcats escaped Berkeley with a 33-28 win over 1-8 Cal to improve to 6-2 overall and 3-2 in the Pac-12.

Maybe it should have been easy against a struggling and rebuilding Golden Bears team, but it never was.

“We knew there was going to be some adversity and that we would have to be resilient,” Rodriguez said. “As I told our team afterward, it’s not pretty how we’re playing right now, but it’s a good road win in the Pac-12.

“I never anticipate a sloppy game, but I did anticipate some adversity.”

Saturday’s win had sloppiness and adversity.

When Cal quarterback Jared Goff found receiver Kenny Lawler for a 29-yard touchdown with 1:42 to play, the Golden Bears were suddenly in upset range. The score made it a five-point game and the Golden Bears lined up for an onside kick.

But junior cornerback Jonathan McKnight, who was burned on the 29-yard score, recovered the kick. Two plays later, on second-and-8, Ka’Deem Carey gained 17 yards for a first down to ice the win for the Wildcats.

It gave the UA a three-game conference winning streak for the first time under Rodriguez and back-to-back road wins for the first time in the coach’s tenure at Arizona.

“It was never easy,” UA quarterback B.J. Denker said. “That team is a lot better than 1-7 and they’re definitely better than 1-8.”

Added free safety Jourdon Grandon: “It’s always close and tight when we play Cal. Always. I feel like every single team we play, we get their best chance. I don’t know why, but we do and sometimes we have to grind out a win.”

The game turned late in the third quarter thanks to a couple of big plays from McKnight and Grandon.

With UA up 26-21, Goff was picked off by McKnight on third-and-10 from his own 17-yard line. Four plays later, Denker scored from 14 yards out to make it 33-21 with seven seconds to play in the third.

On Cal’s next drive, Goff led Cal down to UA’s 20-yard line. On fourth-and-2, defensive coordinator Jeff Casteel sent two safeties in on a blitz. Goff was flustered and was intercepted again, this time by Grandon in the end zone with just more than 10 minutes to play in the game.

“Those plays were huge,” Rodriguez said. “We didn’t get a lot of pressure on the quarterback when we sent three, but on the one fourth-down play, Coach Casteel sent them all and I thought that was huge. “

Despite 448 yards of total offense on 89 total plays, Arizona had trouble finishing off drives at times.

Carey finished with a hard-earned 152 yards on 32 carries. He gained 26 yards on two carries at the end of the first half when Cal was in a prevent defense and then had the 17-yard gain at the end. Take those away and Carey had 109 yards on his 29 other carries.

“Cal did a good job of loading up the box,” Carey said. “It seemed like they were really focusing on stopping me, but you come into games expecting that and you adjust. B.J. did a good job of keeping it on some and making some big runs at the end of the game.”

After rushing for 192 yards last week at Colorado, Denker finished with a pedestrian 44 yards on 15 carries, but had three scores. Coming into the game, Rodriguez said the coaching staff wanted to limit some of Denker’s carries because the quarterback was banged up this week.

“They (Bears) did not want Ka’Deem to have the ball,” Denker said. “I can not stress that enough. I knew that I was going to have to keep it and some take shots.”

Denker was efficient through the air yet again. The senior finished 24 for 38 for 261 yards, a touchdown and no interceptions. Since throwing two picks in the Pac-12 opener at Washington, Denker has just one in his last four games.

“He didn’t have his best games his first couple,” Carey said of Denker. “You just have to have a quarterback relax and get into a rhythm. I knew he would sooner or later and he’s just helping us out so much right now and we’re rolling.”

UA will now head into Saturday’s home showdown with No. 17 UCLA already knowing it’s bowl eligible.

Considering the team didn’t know who its starting quarterback was going to be 2ƒ months ago and lost its No. 1 receiver to a torn ACL in spring drills, no one is complaining.

“Any bowl game is a good game for us,” Carey said. “Just to know we have another bowl, another game to play is great for our seniors. This year, switching up the quarterback and losing Hill, shout out to Coach RichRod. He saw our strengths and we’ve capitalized off that so far.”