They helped the No. 17 Terps take a three-point lead on a pair of free throws by junior guard Melo Trimble with 56 seconds remaining, when Purdue star Caleb Swanigan fouled out after initially blocking the Maryland star's layup attempt.
They helped Maryland get a last-ditch chance when freshman wing Kevin Huerter's long inbounds pass sailed over senior center Damonte Dodd's head, only to have Purdue center Isaac Haas get called for a travel with 0.5 seconds left.
In the end, the college basketball gods abandoned the Terps, who saw their seven-game Big Ten winning streak end with a 73-72 loss before a disappointed sellout crowd at Xfinity Center.
While crediting Purdue for the kind of comeback road win the Terps have made a habit of, Maryland coach Mark Turgeon knew his team had contributed to its first loss since a New Year's Day defeat at home to Nebraska.
"This one hurts," said Turgeon, whose team was playing a top-25 team for the first time this season. "We played well enough to win. I'm really proud of my group. We just had some silly fouls and we allowed them to beat us at the foul line rather than earning it down there at the end."
The Boilermakers made 16 of 19 from the free-throw line, including four straight in the last 38 seconds, the go-ahead pair by freshman guard Carsen Edwards with 2.1 seconds left.
More importantly, Maryland's inability to hit shots down the stretch was an even bigger factor. The Terps didn't hit a field goal in the last 7:37, but had stayed in the lead by making free throws, most of them from Trimble, who made 14 of 15.
Swanigan, the favorite to win Big Ten Player of the Year, led Purdue (19-5, 8-3 Big Ten) with 26 points and 10 rebounds. It was the 6-foot-9 sophomore forward's 20th double-double of the season. Trimble led the Terps with 22 points, but shot 4-for-15 from the field, including 0-for-4 on 3-pointers.
As a team, Maryland shot 23-for-58 from the field (39.7 percent) and only made only four of 19 3-point attempts.
"They were great defensively and we couldn't make a jump shot," said Turgeon, whose team led by as many as 12 points in the second half. "I wish I could've gotten us a layup."
Said Purdue coach Matt Painter, whose team led for a total of 59 seconds and never by more than a couple of points, "It wasn't our defense. They just missed some open ones. We were very, very fortunate."
Trimble missed a short pull-up jumper with 16 seconds to go and eight seconds left on the shot clock. After Edwards made the free throws and Haas was called for traveling, Huerter's slightly off-balanced corner 3-pointer at the buzzer sailed long.
Asked if thought he had made the shot, Huerter said, "I'm always confident when I shoot."
Huerter acknowledged the fact that he had less than a second to get the shot off was a factor.
"That was something going through my head," Huerter said after the game. "For me thinking about it now, I'm not mad I missed. I didn't shoot it the way I wanted to. It didn't feel like the shots I was taking throughout the game. That's what I'm most frustrated with."
Turgeon didn't second-guess Trimble's decision to pull up from about 10 feet on his last shot rather than driving, as he had done for most of the second half. Nor did Turgeon question whether Trimble had shot too quickly, allowing Purdue a better chance to set up a play at the other end.
"That was on me if he shot it too soon," Turgeon said. "I told him when to run the play. You never know what's going to happen. What a great shot. He's your best player, he's been unbelievable for three years, he got to the foul line 15 times. He was terrific. He was the reason we were in the game."
It looked for a while like Maryland was going to win easily.
After seeing a nine-point lead in the first half cut to two at halftime, the Terps stretched their lead to as many as 12, 52-40, on a dunk by Huerter with 13:47 to play. But after Painter called timeout, the Boilermakers went on an 11-0 run.
Every time it seemed as if Purdue was poised to go in front, Maryland would come up with a defensive stop. While they weren't hitting from the outside, the Terps were making most of their free throws to hold the Boilermakers at bay.
But Purdue, which collapsed down the stretch at Nebraska on Jan. 29 as well as at Iowa on Jan. 12, hung in there even with its best player, Swanigan, on the bench after fouling out.
"It's huge," Painter said. "Obviously for us to get two top-25 wins this week [also beating No. 25 Northwestern] is key because it's hard when you get opportunities to play people. It's so tough to beat them, let alone on their homecourt. So you have to try to your best to take advantage of it."
Said Huerter, who finished with 11 points and nine rebounds, "It definitely was an opportunity [lost], but there's definitely going to be more opportunities coming up. It would have been a good win, obviously to get the win in front of the home crowd, and kind of get some respect behind our name."
NOTES: Junior center Michal Cekovsky, in only his fourth game back after missing more than a month with a foot injury, finished with 10 points and a career-high six blocks in 13 minutes. Maryland's next game is Tuesday at Penn State.