Maryland quarterback Perry Hills left the game late in the first half with an undisclosed injury. (Chris Knight/Associated Press)

Maryland Coach DJ Durkin detests idleness and is known for his constant movement, but all he could do with 15 seconds remaining in the first half of Saturday’s game against Penn State was stand still. He crossed his arms and shook his head as he stared off at his beleaguered defense, which had just fallen asleep and allowed Nittany Lions sophomore Saquon Barkley to run untouched through the middle of the field for a 45-yard touchdown.

Durkin eventually snapped out of it and started stalking the sideline again, but he knew it was a crushing turning point in a 38-14 loss at Beaver Stadium. A few hours later, after Maryland’s first loss of the season was finally sealed in humbling fashion, Durkin couldn’t find the words to describe the breakdown.

“Just indescribable,” Durkin said. “It really, really is. We didn’t call it well. We didn’t execute it well. Just flat out.”

Just a minute earlier on the previous drive, Maryland (4-1, 1-1 Big Ten) had seized momentum despite losing senior quarterback Perry Hills to a shoulder injury. Freshman Tyrrell Pigrome relieved Hills and ran in a seven-yard touchdown on his first touch to make it 17-14 with 52 seconds left before halftime, and the Terrapins seemed as if they had weathered a sloppy first half that included two turnovers and ineptitude in all three phases of the game.

Barkley then ripped off 70 yards in three plays, capping the 26-second drive with a demoralizing scoring run. It was the crowning sequence in his 202-yard performance, which was only the beginning of Maryland’s problems Saturday.

“We just have to know how to face adversity and just know that we have to have an answer for it,” junior linebacker Jermaine Carter Jr. said.

Maryland’s offense, which had put up a program-record 173 points in its first four games, finally looked pedestrian — gaining just 270 total yards — and the defense allowed Penn State (4-2, 2-1) to amass 524 off of a dangerous zone-read running attack.

It was spearheaded by Barkley and Trace McSorley, a dual-threat sophomore quarterback from Briar Woods High in Northern Virginia who accounted for 233 total yards and gave Penn State a 17-7 lead on a nine-yard scoring run with just more than six minutes remaining in the second quarter.

Maryland’s offense had thrived with an unpredictable running game through its first four wins, against the likes of Howard, Florida International, Central Florida and Purdue ; it entered the game sixth nationally, with 300 rushing yards per outing and no running back averaging more than 10 carries. But Saturday it struggled to keep Penn State guessing early and finished with just 170 yards on the ground.

Maryland tied the game at 7 after Hills hit sophomore running back Ty Johnson on a 66-yard touchdown pass off a screen midway through the first quarter. Big plays were difficult to come by the rest of the day, and Hills was drilled on blitzes to his blind side on two crucial plays that led to an interception and then a fumble at Penn State’s 20-yard line with 3:38 remaining in the first half.

Hills was injured on the following drive after moving the Terrapins deep into Penn State territory. Less than a month after injuring his shoulder in the double-overtime win at Central Florida, Hills went down on a similar running play Saturday.

“It was his shoulder. Perry is about as tough as they come. He was wanting to come back in. I didn’t feel it was in the best interest of Perry or our team to put him back in harm’s way,” said Durkin, who didn’t offer a timetable on Hills’s possible return.

Pigrome, who replaced Hills and scored a 24-yard, game-winning touchdown on his first snap against Central Florida, did it again on his first drive Saturday but was ultimately upstaged by Barkley on the following drive.

The second half looked doomed from the opening kickoff, when redshirt freshman Isaiah Davis was ejected with an unsportsmanlike-conduct penalty for flattening kicker Joey Julius away from the play. It was the second consecutive week in which Julius had been the subject of a cheap shot, and Durkin screamed at Davis as he walked off the field to a chorus of boos.

“If he wasn’t thrown out of the game, he was removed from the game by me,” Durkin said. “That is not our program.”

Maryland’s best chance to close the gap came after Pigrome drove the offense to Penn State 22-yard line with just less than nine minutes remaining in the third quarter. Instead of turning to his unproven kicking game for a field goal on a fourth and two, Durkin opted to go for it. In perhaps a move to catch Penn State off guard, offensive coordinator Walt Bell had Pigrome (5 for 9 passing for 28 yards) hand the ball to little-used true freshman Jake Funk, but he was cut down in the backfield by defensive back Marcus Allen (Wise High), and Penn State took over.

McSorley made it 31-14 on the final play of the third quarter, going play-action and hitting sophomore DeAndre Thompkins for a 70-yard touchdown pass. Maryland’s defense staggered back to the sideline, looking defeated for the first time all season.

“We’ve had so many firsts together. So this is our first loss together,” Durkin said, “and they’re all learning experiences.”