San Diego • The past week wasn’t pretty, but it was what the Cougars needed. And it may help bump the BYU men’s basketball team into the Associated Press Top 25 for the first time in nine years.

BYU survived two games on the road, beating Loyola Marymount on Thursday and San Diego on Saturday for six-straight wins. The Cougars, however, secured the wins differently than before.

After shooting a record-tying nine games straight above 50% from the field, BYU struggled with getting shots to fall last week. The Cougars still managed to pull away from the Lions but had to rely on defense — an issue they’ve struggled with throughout the season — to secure the win against the Toreros.

“I was super nervous about [the San Diego game],” coach Mark Pope said. “With Dalt [Nixon] being out — it’s the first time we played a game without him — and just where we are in the season right now. And after these guys had such an unbelievable effort at LMU and us being (4-4) here in the last eight years, and with a team that’s playing better and — all that was concerning. I’m just proud of my guys for gutting it out.”

On Thursday, even though BYU was held to 42% shooting from the field — and a concerning 37% in the first half — the Cougars made the best of their opportunities. While the 2-point shots struggled to fall, BYU made a program-record 18 3-pointers.

On Saturday, being held to 45% shooting from the field, the Cougars turned to their defense.

“We came into that huddle and we were on the defensive end and every single guy was like, ‘I like this,’” senior Yoeli Childs said. “Every single guy was, ‘I’m glad they have they ball. We’ve got to end this on a stop.’ And that mentality is going to take us really far. That growth mindset is going to take us very far.”

While USD doesn’t look the best on paper — the Toreros are 9-19 overall this season and have won only two West Coast Conference games — nearly half of their WCC losses have been by 10 points or fewer.

Two road wins will surely help improve the Cougars’ resume, and they could enter the AP Top 25 as the seven bottom-ranked teams all suffered at least one loss this week.

BYU previously was four spots out from making the Top 25.

BYU is now 21-7, 10-3 WCC, and 5-5 in true away games heading into the last two home games of the season — against Santa Clara and Gonzaga — before closing out the regular season at Pepperdine.

The Cougars have yet to play against Santa Clara this season, but they are familiar with Gonzaga — a team they lost to earlier this season.

While Gonzaga is the favorite coming into Provo, a BYU win would solidify a No. 2 seed for the Cougars going into the WCC Tournament and bode well for the NCAA Tournament.

“Every win’s huge for us,” senior TJ Haws said. “This San Diego team is good. Their record doesn’t really reflect how good of a team they are, and tonight was a battle from start to finish. I think it gives us a lot of momentum. We’re excited to go into next week and we’ve just got to keep taking it one game at a time.”