Maryland men’s basketball guard Eric Ayala feinted left as he passed half court with about 12 minutes to play against Purdue on Tuesday. Boilermakers guard Carsen Edwards stumbled back, hit the deck, and watched as Ayala bolted toward the corner and hit the first of two consecutive 3-pointers that changed the complexion of Tuesday’s game.

Off an inbounds pass the next time down the floor, Ayala found another opening when Edwards lost his footing. The freshman sank the trey — three of his 15 points — to tie the game.

Ayala’s buckets were part of 21 straight Maryland points scored by freshmen, a stretch that sparked the 70-56 comeback victory over No. 12 Purdue and showed the promise of an underclassmen-heavy squad cementing into production at a rate even Ayala struggled to believe.

“You said 21 straight points?” Ayala asked postgame, seeking clarification of the streak. “Oh, wow. That’s tough.”

Two months ago, with Big Ten play still in its infancy, coach Mark Turgeon chalked Maryland’s two-point loss to Purdue up to inexperience.

In the final 6:22 of play Dec. 6, the Terps scored one field goal and turned the ball over four times. But Turgeon figured his team had grown in that timespan, ready for a rematch against a squad in the midst of an eight-game winning streak that’s propelled them to No. 12 in the country.

Entering halftime with an eight-point deficit, Maryland exhibited that growth down the stretch, while Purdue was out of sorts in the final minutes. When forward Bruno Fernando flexed to the Xfinity Center crowd for the second time of the night with about a minute remaining, it was after Maryland all but wrapped up its 14-point win.

“We’ve come a long ways,” Turgeon said. “They’re young guys, but they have a lot of experience now. They just keep getting better.”

Maryland (19-6, 10-4 Big Ten) didn’t have its first lead until the 10:14 mark of the second half, trailing the Boilermakers by as many as 11 before that point. Purdue (17-7, 10-3) scored just four points in the final eight minutes, however, while Maryland’s offense kept clicking inside, with Fernando and forward Jalen Smith getting easy buckets in the paint.

The Terps held the Boilermakers to 18 points and 1-for-16 three-point shooting after halftime, limiting guard Carsen Edwards to seven points in the second half.

“You just feel like a lid’s on the rim, you know?” Purdue guard Ryan Cline said. “We had a couple that were right at the rim and just didn’t fall.”

Fernando, who was held to nine points the last time the teams met, had three points in the first half Tuesday against a dogged double-team. He avoided giveaways, but his only turnover of the frame was a costly one.

After Edwards got to the line with 40 seconds remaining — a call that particularly vexed Turgeon and the crowd — and drained both foul shots, Fernando lost control of the ball. Cline picked it up and broke upcourt, pulled up from 25 feet with five seconds left and nailed his third triple, re-establishing a lead the Terps had whittled down to three back to eight points.

But Maryland recovered out of halftime, with guard Anthony Cowan completing an and-one and Smith throwing down two dunks — part of his team-high 16 points — to tie the game at 40 within five minutes. Then, Ayala hit his two corner threes in quick succession to make it 48 all.

“That was huge,” Purdue coach Matt Painter said. “That was the game.”

Guard Aaron Wiggins’ triple near the end of Maryland’s freshmen scoring streak held the advantage until Fernando found a rhythm late, pumping up the Xfinity Center crowd as only he can. On just his second field goal attempt, Fernando dunked over center Matt Haarms, then raced down the floor flexing his arms and waving for the arena to get loud as the Boilermakers called timeout.

Two months after the Terps’ late collapse in West Lafayette, Indiana, the Boilermakers crumbled down the stretch. Fernando capped the night with one more jam, and Maryland remained undefeated at home during conference games.

“That’s a win that we can look back and kind of realize we can stay in the game with anybody,” Fernando said. “For us to have that win means a lot.”