With seven minutes and 37 seconds remaining in the Maryland men’s basketball team’s game against Purdue on Saturday, guard Anthony Cowan threw a lob to forward Michal Cekovsky as the junior sprinted toward the basket off a pick and roll. Cekovsky reached behind his head to corral the ball before throwing down a dunk, giving the Terps a three-point lead and putting the sellout crowd of 17,950 at Xfinity Center on its feet.

That was the last time No. 17 Maryland made a field goal in its 73-72 loss to the No. 23 Boilermakers.

While the Terps made 14 free throws the rest of the contest, their offense lost the ball movement that had carried them to a 12-point lead early in the second half. Instead, guard Melo Trimble put his head down and drove during much of that stretch. While that strategy was effective at times, the Terps’ 0-for-8 shooting from the field after Cekovsky’s dunk doomed them in their first test against a ranked opponent.

“We couldn’t make a jump shot,” coach Mark Turgeon said. “They were great defensively. They zoned up on the point guard. I wish I could’ve gotten us a layup. We were going through the motions offensively instead of attacking.”

Maryland entered halftime with a 36-34 edge behind scoring from nine players and 45.5 percent shooting. The Terps carried that momentum out of intermission, taking a 52-40 lead with 13:47 remaining. Maryland’s penetration opened up looks on the perimeter and for the Terps’ bigs.

But Purdue, which entered Saturday with the best three-point percentage in the Big Ten (42.4), caught fire after starting the outing 0-for-7 from downtown. The Boilermakers rode a 11-0 run, which included three 3-pointers, to cut the deficit to one. The Terps squandered their opportunities, such as Dodd’s layup and Trimble and guard Kevin Huerter’s wide-open looks from behind the arc.

That’s when the Terps’ offense began to go stagnant. Trimble halted Purdue’s run by drawing a foul before Cekovsky scored four points off passes from Cowan. When the Boilermakers took a 60-58 advantage with 6 minutes 37 seconds left, Trimble, who usually leads late comebacks, controlled Maryland’s possessions.

The junior drove on isolations and pick and rolls while Maryland’s wings stood around the perimeter. He scored nine straight points for the Terps, all of which came from free throws. But the fluid offense Maryland had used to get out to an 8-1 conference record disappeared.

“Melo is really effective anytime he’s in the ball screen,” Huerter said. “At that point in the game we thought he would have a mismatch with some of their bigs we thought we could take advantage of. Sometimes Melo in a ball screen is our best offense.”

Four of Maryland’s final eight field goals came from beyond the arc. Turgeon said some of those attempts were unwarranted. Still, Maryland maintained its lead for much of the contest behind Trimble’s aggressiveness, as he shot 14-for-15 from the free throw line in the second half.

With one minute and 41 seconds remaining, though, Cowan, who entered as a 28.3 percent 3-point shooter, took a contested shot from beyond the arc that clanged off the rim. Purdue forward Caleb Swanigan, who finished with a game-high 26 points and 10 rebounds, responded with a 3-pointer that cut Maryland’s advantage to one. The All-American candidate put three fingers on both sides of his head while running back down the court.

After both teams made a pair of free throws, Trimble was the lone player to touch the ball on Maryland’s final full possession. The Upper Marlboro native received a screen from forward Damonte Dodd and missed a mid-range jump shot from the left wing with 16 seconds remaining.

“What a great shot,” Turgeon said. “He’s your best player. The guy’s been unbelievable for three years. I loved it. He got the ball six feet away … and it was disappointing.”

From there, Boilermakers guard Carsen Edwards drew a foul and sunk the free throws to give his squad a 73-72 edge. Maryland received the ball back after a complex series of events, but Huerter missed a 3-pointer from the right corner.

The last time the Terps’ offense went that stagnant late in a game was during Maryland’s 67-65 loss to Nebraska on Jan. 1, when Maryland didn’t convert a field goal in the final six minutes and 43 seconds and blew a 12-point lead. Maryland won seven straight after that defeat, and Huerter hopes the Terps can regroup again as they go on the road for three of their next four contests in search of a marquee victory.

“We really wanted to keep them into floaters and pull-ups rather than shooting threes or getting to the rim,” Purdue coach Matt Painter said. “The one stretch they got up 11, I thought that was the game right there. They had to mess something up in transition, where they had an advantage. We were able to creep back into the game.”