SPOKANE, WASHINGTON — With the Terrapins men’s basketball season on the line Friday, guard Jaylen Brantley thought of his mother, who he said was probably screaming at the TV. Her son had just bricked the first of two free throws with the Terps up 76-74 in the NCAA Tournament.

“It just calmed me down a lot,” Brantley said. “[I] just tried to make myself laugh a little bit in my head just to calm my nerves a little bit.”

The reserve guard, who had attempted two free throws in the Terps’ past 12 games, drilled the second one. But his first miss had opened the door. South Dakota State had the ball down three with 12 seconds left.

So Brantley locked in on defense. He forced Jackrabbits guard Keaton Moffitt to pick up his dribble near half court. South Dakota State never called timeout and guard Rasheed Sulaimon swooped in to take the ball for a dunk that sealed the No. 5-seed Terps’ gut-wrenching 79-74 escape over the No. 12-seed Jackrabbits at Spokane Veterans Memorial Arena.

With the win, the Terps have now won 12 straight opening-round games in the NCAA Tournament and will play No. 13-seed Hawaii, which upset No. 4-seed California, on Sunday for a spot in the Sweet Sixteen.

“It’s hard to win in this tournament, and I thought for 36 minutes we were really good,” coach Mark Turgeon said. “Had an 11-point lead, and they hit back-to-back threes and everything changed. And that happens in this tournament.”

For most of the afternoon, it seemed the Terps wouldn’t need any last-minute theatrics to extend their season. They led by 12 at the break and by as many as 18 in the second half. But South Dakota State shot 60 percent after halftime, trimming a 15-point deficit with 6:33 left to just two points before the final minute.

The Terps found themselves in the precarious position with star guard Melo Trimble looking on from the bench. The sophomore fouled out while contacting guard George Marshall during a three-point attempt with 1:03 remaining.

“It was tough to be on the bench at the end of the game,” Trimble said. “I normally like to shoot the last free throws to end the game.”

Trimble, who scored 15 first-half points to help the Terps to a double-digit edge, was limited to 12 minutes in the second half. Without the floor general on the court, forward Jake Layman emerged for the Terps.

The senior matched his career high with 27 points, going 5-for-8 from beyond the arc. The veteran leader hit all four of his free-throw attempts in the final minute, both series of attempts pushing the Terps’ lead back to two possessions.

But the Terps committed “silly fouls” at the other end, Turgeon said, which enabled South Dakota State to hang around for the final possession.

Less than four minutes into the second half, Trimble and center Diamond Stone — the team’s two leading scorers — sat on the bench with three fouls apiece. Then with 15 minutes left, forward Robert Carter Jr., the third leading scorer, joined them.

With the majority of their offensive firepower sitting courtside, the Terps turned to a pair of sharpshooters in Layman and guard Jared Nickens. The duo hit 3-pointers on five straight possessions at one point, combining to score 17 straight points.

“The key in that stretch was we didn’t guard very well, so they kind of hung around,” Turgeon said. “If we were shooting the lights out and executing at a high level, it should have been a 20-point game. Instead, at the media timeout it was only 14, and I said, ‘Dang, it seems like we should be up more than this.'”

With less than 15 seconds left, the lead was nearly gone. Brantley, who averages just 8.3 minutes per game, was standing at the charity stripe.

The junior college transfer had all of college basketball watching him. But he was focused on one person: His mother. He didn’t want to let her down.

“I was like I can’t miss the second one,” Brantley said.

He didn’t.