It was a shot Eric Ayala has made hundreds of times. Wide open along the arc, the Maryland men’s basketball guard leapt into the air, his signature calm demeanor and smooth stroke signaling confidence to his teammates that the shot would fall and give the Terps the lead.

Except it didn’t. Instead, the attempted three clanged away, the rebound pulled down by Northwestern’s Ryan Young. And after a foul, Young sank his free throws to extend the Wildcats’ advantage to three.

Another last-second look bounced away, and Maryland trudged off the Welsh-Ryan Arena court with its heads down, an opportunity for a victory over a struggling Northwestern squad squandered. The Wildcats’ 60-55 win snapped the Terps’ five-game winning streak and set them back as they battle for a postseason berth.

“We got back to our inconsistencies when we weren’t a very good team [earlier in the year],” coach Mark Turgeon said. “We were back to that team tonight.”

Much like Sunday, Maryland (15-11, 9-10 Big Ten) controlled the tempo early and shot out to a lead. Four of its first six shots fell — a midrange two from Donta Scott, a crafty give-and-go with Aaron Wiggins and Eric Ayala, a splash from deep for Wiggins and an emphatic dunk off a steal for Darryl Morsell had the Terps up 9-0.

[Hakim Hart has grown into a starting role for Maryland men’s basketball]

The defense stayed feisty, too. Northwestern could not get downhill, and when it passed out of double teams to the perimeter, Maryland closed quickly. It forced bad shot after bad shot, the Wildcats not breaking through until a putback from Pete Nance nearly five minutes in.

And then, the Terps stagnated.

While its defense continued to lock Northwestern down, Maryland struggled to hold on to the ball. A nearly eight-minute stretch featured one field goal and a run of five turnovers in six possessions. Wiggins chucked a pass over everyone’s head. Jairus Hamilton stepped out of bounds. Hakim Hart walked.

And slowly but surely, the Wildcats chipped away. Threes from Ty Berry and Chase Audige off a pair of Wiggins turnovers brought Northwestern (8-14, 5-13) within one, before another Nance longball pushed coach Chris Collins’ squad ahead.

“They adjusted to our doubling,” Morsell said. “They started hitting shots, and they made it a game.”

The Terps then picked up the pace, threes and layups dropping rapidly. But the Wildcats answered every time from deep, taking a 28-26 lead into the locker room.

And those offensive woes carried over into the second half. Misfires from Hart and Ayala were answered by Boo Buie and Audige on the other end. Maryland still had butterfingers as well, travels and lazy giveaways from Scott and Morsell leading to Northwestern second chances. The Terps finished with 15 turnovers.

Meanwhile, the Wildcats continued their domination of the offensive glass. Robbie Beran followed his miss with a lay-in leading to an and-one, one of many scenarios when Collins’ squad flexed its strength on the boards. Northwestern outrebounded Maryland, 8-5, on the offensive boards Wednesday night.

“Just weren’t really locked in as a unit,” Wiggins said.

[With the help of a fast start, Maryland men’s basketball surged past Michigan State]

Even still, the Wildcats only held a six-point edge. And with the Terps looking to avoid an upset and extend their win streak to six games, coach Mark Turgeon’s squad turned to its steady hands.

Wiggins stepped back in the lane for a two and followed that up with a long-range triple. Moments later, Ayala found space and hit a three of his own to knot the contest at 43.

The sides traded spurts — a Nance dunk here, a Morsell triple there — and Northwestern found itself up two with 5:13 remaining. Then, Wiggins took over.

He found himself wide open from deep, smoothly swishing the shot to send Maryland up one. After a Nance jumper, he crashed the lane, going up strong for the and-one — and two point lead. He finished with a career-high 26 points.

But Northwestern swiftly responded, rattling off a 6-1 run in the final 2:59, Maryland’s offensive struggles creeping back to the forefront.

So, it all came down to the Terps’ final possession. After Ayala’s miss, Maryland still had a shot. It moved the ball quickly to an open Morsell, who clanked a jumper from behind the arc.

As his teammates scrambled, he stood and looked at the rim, shocked as the Terps fell to a team that had just picked up only its second win of 2021.

“We put ourselves in good positions offensively to make shots,” Morsell said. “I don’t think we got the stops we needed to at the end of the game to win that game.”