If Maryland football’s discipline in its Week 2 blowout win against Syracuse had made coach Mike Locksley’s “skin crawl,” he was certainly itching following the 20-17 loss to Temple a week later.

In the 63-20 thrashing of the Orange, the Terps accumulated five penalties for 30 yards — featuring an offside on the opening kickoff, an example of what Locksley calls a “dumb” penalty — before racking up nine flags for 88 yards against the Owls. The display in Philadelphia included two defensive penalties on Temple’s game-sealing touchdown drive.

While Maryland’s 30 penalty yards against Syracuse were fewer than in all but one of its 12 games last season — in which the team averaged 79.67 penalty yards per contest — it’s a rabbit hole Locksley has no interest in venturing down during his first season as full-time head coach in College Park.

So, to counteract the self-inflicted miscues that can gift an opponent new life or stall an offense’s possession, the Terps’ coaching staff made limiting penalties a priority heading into the year, with the hopes of making performances like the 88 penalty yards against Temple an anomaly.

“That’s a big thing that coach Locks harps on, is that we want to be the least penalized team in the game,” linebacker Shaq Smith said. “The majority of the penalties that we had in that game were penalties that we could control.”

[Read more: Maryland football hopes to iron out Josh Jackson’s mistakes vs. Temple during bye week]

Late in the second quarter at Lincoln Financial Field, linebacker Ayinde Eley intercepted Owls quarterback Anthony Russo near midfield, seemingly setting the Terps up with a chance at points before halftime. But there was a yellow marker on the field, and before Eley and his teammates could celebrate a turnover, a penalty for 12 men on the field nullified the takeaway.

Then in the third quarter, Maryland was disciplined twice for unsportsmanlike conduct — although one was offset — and cornerback Tino Ellis was flagged for pass interference and defensive holding midway through the fourth, offering Temple two free first downs on what became a 14-play, 76-play touchdown drive.

And on Maryland’s final drive, facing a third-and-goal from the seven-yard line, offensive lineman Marcus Minor’s false start backed his squad up five more yards. On their own, the penalties weren’t the sole cause of the three-point defeat. But the miscues piled up, plaguing the Terps along the way.

“A lot of the penalties were probably just really us beating ourselves,” wide receiver Brian Cobbs said. “We can’t have a lot of negative penalties because, especially in big games, those can come back to bite you.”

The Terps watched all of those pitfalls again, as they do every week, to glean some understanding of what went wrong and how to avoid repeating it.

While Maryland has had officials at practices in the past, it was more sporadic. Since the beginning of spring camp this year, referees are present at each full practice, charting penalties and going through them to help the Terps clean up their play.

[Read more: An inability to convert when it mattered most doomed Maryland football in loss to Temple]

“The big thing is just with having those officials at practice every day,” Locksley said, “it really helps us with being able to have it taught and make sure it’s emphasized not just in games, but we do it in practice as well.”

The focus stems from one of last season’s most noticeable trends — one nearly entirely independent from anything the opponent does. Maryland ranked No. 129 in the country in penalty yards per game. Locksley sought to fix that. Through three games this year, the Terps are at No. 81 in the country, with 88 yards against Temple serving as an outlier.

That work started as soon as Locksley and his staff first arrived in College Park, attempting to implement greater discipline. It began with “Plain Jane,” Cobbs said, a rule creating consistency with practice uniforms — undershirts aren’t untucked, everyone’s identical.

Discipline builds from there. And the Terps hope it can help stamp out the sort of self-destructive penalties that beleaguered the team in 2018 and certainly didn’t help against Temple.

“Coming in, they wanted to make us a whole lot more disciplined,” Cobbs said. “They’ve done a great job doing that, and we’ve bought into that as well.”