BOULDER, Colo. — Last-minute 3-pointers won the previous three games for the Cal men’s basketball team, and Thursday night was merely a variation on the same theme as the Bears nailed 10 treys en route to a 68-61 victory at Colorado.

Jordan Mathews hit 5 of 7 from beyond the arc on his way to a game-high 22 points.

And now, not only has Cal won five consecutive games immediately on the heels of losing six in a row, but on Thursday it prevailed in Boulder for the first since in more than 40 years. The Bears had gone 0-6 since 1974 at Colorado — until this trip.

“When we play as a group like that, the sky is the limit for this team,” said Mathews.

While this game wasn’t quite as close as the previous three, which the Bears won by a combined five points, it was certainly no cakewalk. Cal led by as many as 11 in the second half, but Colorado closed the deficit to 63-61 on a 3-pointer by Askia Booker with 1:43 remaining.

However, an 18-foot potential game-tying jump shot by Colorado’s Josh Scott went in and out, and Tyrone Wallace drained a floater from the lane to push the margin to four with 21 seconds left.

Then a steal by Sam Singer six seconds later virtually sealed the victory for Cal, which improved to 16-9 and 6-6 in Pac-12 action.

“To beat a team of this magnitude on their home floor with this type of energy and passion was great for our guys and our program,” said first-year Bears coach Cuonzo Martin.

So how does a team that had lost a half-dozen games in a row as of late January now find itself on a five-game win streak?

“We never got our heads down,” said senior David Kravish, who finished with 14 points and seven rebounds. “We kept working and trying to get better every day even when we were losing. The coaching staff has been great keeping our spirits up, telling us to keep pushing, (saying) you’re going to break through, the dam is going to break. We keep working, we win five in a row and it’s great — especially here. To roll in here and get a win, that’s huge.”

Indeed, Thursday’s loss marked the first time under coach Tad Boyle that Colorado (11-12, 4-7) has lost consecutive home games.

Joining Mathews and Kravish in double figures scoring for Cal was Wallace, who tallied 16 points. Singer racked up four steals and six assists to go along with four points.

Next up for Cal is a game at No. 11 Utah on Sunday at 5:30 p.m. The Bears are now 5-2 in true road games this season.

Cal junior forward Christian Behrens, who has fully or partially torn his left ACL three times since high school, missed Thursday’s contest with a left knee injury and will undergo arthroscopic surgery on Friday. Behrens is averaging just under five points per game this season.

Former Cal football standout C.J. Anderson, who now plays for the Denver Broncos, attended the game.