With 56 seconds left in the Maryland men’s basketball team’s game against Purdue, much of the Xfinity Center crowd waved goodbye to the best player on the floor Saturday.

Boilermakers forward Caleb Swanigan had just hacked guard Melo Trimble to pick up his fifth personal foul, meaning he had to watch the remainder of the contest from the bench.

While Swanigan wasn’t the one to down the Terps in their 73-72 home loss — that honor went to guard Carsen Edwards, whose foul shots put Purdue ahead with 2.1 seconds to play — he ensured the Boilermakers had a chance to win late. The 6-foot-9, 250-pound sophomore scored 26 points, including three 3-pointers, and ripped down 10 rebounds, tormenting Maryland in the paint and on the perimeter.

“Swanigan was terrific — back-to-back threes out there,” coach Mark Turgeon said. “He was tough for us.”

The 3-pointers Turgeon referred to in his postgame press conference didn’t actually come on consecutive Boilermakers offensive trips, but both shots helped the Boilermakers regain momentum as they came back from a 12-point second-half deficit.

The initial long ball came at the 7:20 mark of the final frame with the sold-out Xfinity Center crowd still buzzing from Maryland’s last possession. After coming up to set a ball screen, forward Michal Cekovsky rolled towards the basket with no one guarding him. Guard Anthony Cowan took notice, lobbing an alley-oop from the top of the key that the 7-foot-1 Slovak slammed through the hoop.

With the Terps leading, 58-55, Cekovsky lost Swanigan on the perimeter, and the Big Ten’s leading rebounder with 12.8 per game capitalized by draining a triple from the left wing to tie the game.

The latter 3-pointer marked Swanigan’s last made shot of the outing — he finished 9 of 19 from the field — and brought Purdue within one with under two minutes to play. After executing a pick and pop from the top of the key, Swanigan’s celebration included tapping three fingers to both sides of his head. It was the lasting impression of his dominating performance.

“Just keep fighting and come in ways; that was our biggest thing,” Swanigan said. “They came with runs, but we just had to answer each one.”

The Big Ten’s second leading scorer, with 19.1 points per game, also dominated in the paint against whomever he competed against.

The Terps big men bested Swanigan at times, such as when center Damonte Dodd grabbed two offensive rebounds over him in the opening minutes. A few of Cekovsky’s career-high six blocks came against the All-American candidate.

But Maryland’s frontcourt failed to consistently stop Swanigan, allowing Purdue to stick around until Edwards downed the Terps and sent many of the 17,950 fans out of Xfinity Center in disappointment.

“He’s a great player,” Dodd said. “They’re a good team, and they’re going to surprise a lot of people this year.”