All four of Maryland men’s basketball’s losses this season seemed to follow a similar pattern: enter the break with a modest lead and run out of steam in the second half. That was especially true in the Terps’ last two games against Washington and Oregon.

The Terps went into halftime with a four-point advantage against No. 22 UCLA. The story ended differently, as they broke the game open in the closing stages to claim their first ranked win of the season, 79-61, at Xfinity Center on Friday.

“I felt like it was a big statement win for us,” senior forward Julian Reese said. “Coming [off] the two-game losing streak out west … and just taking care of business shows a lot about our character.”

The inflection point came after UCLA coach Mick Cronin received a double technical foul for jawing with a referee with 5:14 left in the game. Cronin was ejected, and junior guard Ja’Kobi Gillespie shot four free throws.

He drilled all four, while Reese quickly followed with a layup, giving the Terps a 15-point advantage they’d never relent.

“Especially when you’re at home and the away coach gets thrown out of the game, and the crowd gets into it,” Reese said, “it’s kind of like a domino effect of events. … I kind of knew we had them right there.”

[Maryland men’s basketball drops to 1-3 in Big Ten play with 83-79 loss to Oregon]

Gillespie produced a season-high 27 points and Reese added 16. It was a quiet night for Derik Queen, as the freshman center scored eight points on seven shots with five turnovers.

UCLA and Maryland played each of the last two seasons as part of a home-and-home. Both teams won on the road — the Bruins in 2022 and the Terps in 2023 — but those weren’t conference games. Friday was the first Big Ten matchup between the two programs and the Terps’ third straight against one of the conference’s newcomers.

The game remained fairly close early. Maryland (12-4, 2-3 Big Ten) went on an 11-0 run after introducing a zone defense midway through the first half, but UCLA (11-5, 2-3) then made four consecutive field goals to cut its deficit to one.

UCLA boasted a KenPom top-five defense entering play. That wasn’t on display early, as Maryland shot the ball at an efficient 52 percent percent clip in the first half. But the Bruins’ elite defense showed life as they forced 16 turnovers. The Terps averaged 9.9 on the season before Friday, the second-lowest mark in the conference.

After another hot stretch, Maryland claimed a 10-point lead off the heels of a Gillespie three-point play, which put the junior at 16 points.

The Terps seemed destined to blow the game open late in the first half, but the Bruins scored eight points in the last two minutes of the period to, once again, close the gap. Maryland entered halftime with a 40-36 lead.

[Maryland men’s basketball’s stars struggle in 75-69 loss at Washington]

Gillespie’s 16 points were a game-high at the break and forward Tyler Bilodeau led UCLA with 14. The Bruins struggled to find other scoring options and couldn’t take care of the ball, turning it over 11 times in the first.

That trend continued in the second half — the Bruins ended the game with a joint season-high 21 turnovers. Maryland scored 26 points off those giveaways.

“We’re one of the best teams in the country at how long it takes to get a shot off,” coach Kevin Willard said. “We’re not one of the best teams in the country at finishing those possessions. So I thought we did a much better job — I thought we took a step in the right direction.”

The second half was more of a grinded-out affair. UCLA shot just 36 percent from the field and went four minutes without a field goal at one point. Maryland did the same across a nearly six-minute stretch, with plenty of overlap between the two.

The Terps eventually broke the game open — but largely not by their own doing. Cronin’s ejection created a swift six-point swing that essentially put the game out of reach for UCLA.

Both teams were reeling after losing their first two games to start the New Year. Maryland got a much-needed win — its first ranked one of the season that kept it from sliding into the depths of the Big Ten.