For a moment, it looked like Maryland’s road struggles had washed away. The Terps — who hadn’t won a game away from Xfinity Center this season entering Friday — held a 20-point lead over UCLA early in the second half.

But that lead quickly evaporated to just two as the Terps’ offense went cold. With their backs to the wall, Jahmir Young stepped up for Maryland.

The fifth-year guard scored a career-high 37 points to lead Maryland past UCLA, 69-60. Young flourished early and saved the Terps late, shooting 13-for-19 from the field and 4-for-6 from three. His supporting cast mostly struggled, shooting a combined 7-for-29 from the field and 4-for-16 from beyond the arc.

Even though only three Maryland players recorded multiple field goals and its bench didn’t score a single point, Young’s heroics were enough to propel them to the Terps’ first win away from home this season and their first against UCLA since 1998.

“[Young] was phenomenal,” Willard. “He had it going early, he felt it. He made some great reads … you saw his eyes, he really wanted the basketball. And then at the end of the game, we needed a bucket and with Julian out, we put the ball in his hands and he made some big plays.”

Friday’s matchup wasn’t the marquee game many expected at the beginning of the year. Maryland and UCLA were ranked No. 23 and No. 26, respectively, by KenPom to start the year, but sat at No. 77 and No. 76 after shaky outings on Tuesday. Maryland barely scraped by Nicholls State in a six-point win and UCLA was upset at home by California State Northridge.

[Maryland men’s basketball ekes out 73-67 win over Nicholls State]

Still, Maryland (8-4) recorded one of its biggest wins of the season and avoided going winless in road nonconference battles this year.

The Terps were only 2-11 on the road under coach Kevin Willard, but Maryland got off to an uncharacteristically quick start away from home thanks to Young. The guard made his first three shots to tally eight points in less than three and a half minutes. He was just getting started.

Young scored 23 first-half points, shooting 8-for-9 from the field and 4-for-4 from three. He led Maryland to a 43-28 halftime lead after spending most of the first 20 minutes with a comfortable advantage.

The guard had help from Donta Scott and DeShawn Harris-Smith, who each added seven points in the half. Scott finished the night with 17 points while Harris-Smith scored nine.

The Terps shot 13-for-25 and a staggering 7-for-12 from beyond the arc in the half while UCLA shot just 32.1 percent from the field and 14.3 percent from three.

[Maryland men’s basketball hopes development of more scorers eases reliance on stars]

Twelve of UCLA’s 28 points came from freshman guard Sebastian Mack, the Bruins’ leading scorer on the season. While Mack put together a strong offensive performance, he and the rest of the UCLA backcourt couldn’t contain Young.

Maryland’s offensive hot streak didn’t continue into the second half. The Terps made just three of their first 18 field goals, which included a drought of more than 10 minutes and 11 consecutive misses.

Julian Reese, who entered the day averaging 15.2 points and 10.2 rebounds per game, fouled out with just less than six minutes to go. The junior forward scored just one point and the Terps were forced to close out a four-point game without their second-leading scorer on the season.

UCLA (5-6) embarked on a 27-9 run over about 12 minutes during Maryland’s offensive struggles to put the Bruins within two, but Young snapped Maryland’s drought with two quick baskets. It put Young up to a career-high 32 points and gave Maryland a six-point lead with just less than four minutes to go.

“[I was] just trying to get downhill, just put pressure on them. We got into the one-and-one [bonus] early so just trying to get down, play off two feet and just take what they give,” Young said.

The guard added another pair of layups and a free throw to finish with a career-high 37 points and lift Maryland to its fourth straight victory. It was the most points in a game by a Maryland player since Diamond Stone in 2015 and led Willard to his 300th career win as a head coach.