Pe'Shon Howard draws a foul on Clemson's Tanner Smith. (Mark Crammer/Associated Press)

Maryland had played this game, it seemed, so many times this season — building double-digit leads on tenacious defense and explosive scoring bursts only to let its opponents seize the upper hand down the stretch.

In the last week alone, that narrative cost Maryland a potential victory in a double-overtime thriller at Miami and squelched what would have been a stunning upset of No. 5 North Carolina at Comcast Center.

Tuesday at Clemson’s Littlejohn Coliseum, Maryland finally got the ending right, fending off a furious late-game rally by the Tigers that slashed a 14-point Terrapins lead to one with 74 seconds remaining and holding on for a 64-62 victory.

It was the first triumph on the road for Maryland (14-9, 4-5 ACC) this season, snapping a two-game losing streak and girding the Terrapins’ confidence for Saturday’s game against Duke at Cameron Indoor Stadium.

“We really needed this win,” said sophomore guard Terrell Stoglin, who finished with a game-high 27 points and four steals. “We get to go home happy now.”

Maryland's Terrell Stoglin runs down court in the second half with one of his team-high four steals. (Mark Crammer/AP)

Coach Mark Turgeon commended his players’ effort and smarts on defense, where they held Clemson to 22 first-half points and 34.9 percent shooting in the game, and their teamwork on offense, where they collected 14 assists on 23 baskets.

But a bit of luck helped the Terps, too.

With Maryland leading 61-58, point guard Pe’Shon Howard fouled Clemson’s senior guard and leading scorer, Andre Young, on a three-point attempt with 10.7 seconds remaining.

That gave Young the chance to force overtime by knocking down three successive free-throws.

Stoglin sent up a prayer. He wasn’t alone among the Terps, who looked on as Young clanged his first two attempts off the rim.

“The whole time he was shooting, I was praying,” Stoglin said. “Thank God, he missed! I didn’t think he was going to miss.”

There were other close calls for the Terps.

Clemson's Devin Booker, right, fouls Maryland's Sean Mosley late in the second half. (Mark Crammer/Associated Press)

Clemson’s Milton Jennings hit a three-pointer with 2.8 seconds remaining to pull the Tigers within one point. But Maryland senior Sean Mosley drew a foul and hit one of his shots for the final margin.

Mosley finished with a game-high six assists and 16 points — the first of which, a free throw less than three minutes into the game, represented the 1,000th of his Maryland career.

“Coming into the game, I just wanted to win,” said Mosley, the 50th Terrapin to reach the 1,000-point mark. “I didn’t care if I scored or not. But guys got me the ball. I couldn’t score 1,000 points by myself, so I’m blessed in that aspect.”

With the defeat, Clemson fell to 11-12, 3-6. Maryland moved out of its tie with the Tigers for seventh in the ACC standings.

Averaging just 64.9 points per game, Clemson didn’t pose the offensive challenge that Maryland’s most recent opponent, North Carolina did.

But both teams shot poorly at the start.

“We couldn’t pass or catch, either,” Turgeon said. “And they were doing the same thing.”

More than eight minutes into the game, the score was 8-8, with both teams shooting less than 30 percent from the field.

Stoglin jump-started the Terps, creating plays from nothing, stripping balls and racing down court for layups, stepping beyond the arc for three-pointers and earning his customary trips to the free throw line.

With three minutes to play in the first half, Stoglin had scored more than half of Maryland’s points (13 of 23) on 5-of-6 shooting and had all three of the Terps’ steals.

After taking a 26-22 halftime lead, Maryland kept the pressure on in the second half, going on a 13-2 run.

With Maryland leading 53-39, Turgeon warned it was no time to let up.

That’s precisely when Clemson made its run. The listless crowd of 7,321 came alive when Young (15 points) and Jennings (14) hit back-to-back three-pointers to cut Maryland’s lead to single digits.