Maryland football raced out to a four-score lead by early in the second quarter Saturday against Rutgers. The Terps had everything working.

The Scarlet Knights’ offense then found itself, scoring a pair of touchdowns — aided by two Maryland turnovers — to trim their deficit down to 11 at halftime.

Maryland defensive coordinator Brian Williams’ unit came out of the half looking to prevent that margin from shrinking any more. They forced punts on Rutgers’ first two offensive possessions, sacked Gavin Wimsatt on fourth down for a turnover on downs on the next drive and intercepted the quarterback next time out to leave their imprint in the second half.

The Terps’ defensive second-half dominance extends beyond Saturday. They limited No. 3 Michigan — an offense that averages more than 17 second-half points — to just six offensive points the prior week.

“We just lock in more, there’s no secret sauce or anything,” safety Dante Trader Jr. said.

In the second half Saturday, Maryland’s defense limited the opposition to under four yards per play, 52 passing yards and a 29.4 completion percentage. The unit’s allowed just 13 second-half points over the last two weeks.

[Taulia Tagovailoa breaks Big Ten passing record as Maryland football beats Rutgers, 42-24]

“We’re a physical defense, we’ve always been, we wear down teams with our physicality,” Trader said.

The Terps’ defense has flashed in key moments in the second halves of each contest.

Tommy Akingbesote overpowered Rutgers’ left tackle on the Wimsatt third-quarter sack, pushing the lineman back and using a swim move to bring down the Scarlet Knights’ quarterback around midfield. Glendon Miller’s fourth-quarter interception against Rutgers came after Maryland’s offense had a quick three-out and its second of three straight punts as it fell into a lull, keeping the Terps in control of the game despite the offense’s brief sputter.

Maryland fought back from a 20-point deficit to trail by just five at the start of the fourth quarter against Michigan. The Terps’ offense had three chances to drive for a go-ahead score — only because the defense forced punts on three consecutive Wolverines possessions.

Williams’ defense has shown spurts of dominance. It kept No. 2 Ohio State’s scoreless in the first quarter and No. 11 Penn State was held to just three points in the third quarter. But the intensity was never sustained for longer stretches.

Against Michigan and Rutgers, Maryland’s defense did just that for the first time in months.

“The camaraderie they have on that defensive side of the ball, the way those players play together, they play with tremendous effort and that doesn’t just happen by chance,” coach Michael Locksley said. “That’s developed. That’s part of the DNA of what we want to become, the consistency.”

[Taulia Tagovailoa’s three turnovers hand Maryland football 31-24 loss to No. 2 Michigan]

Each of the Terps’ last two wins can be attributed to their defense. Maryland defeated Nebraska despite scoring only 13 points to clinch bowl eligibility. The Terps’ lead never dipped below 11 against the Scarlet Knights.

Maryland’s defense kept it in games even in recent losses. It limited Northwestern to nine second-half points, only for a Taulia Tagovailoa interception on the Terps’ final offensive drive to end the chance of a win. Only 20 of Michigan’s 31 points came from its offense — Maryland scored 24 points itself.

“Our defense, it’s played to a level that I think in some of that bad stretch, our defense gave us enough effort and played well enough for us to have a few more wins … the defense never flinched,” Locksley said. “… We got some alpha personalities and they led us through the tough stretch.”

The Terps’ offensive performance fluctuated each of the past two weeks. They scored three touchdowns against Wolverines, FBS’ best defense, but couldn’t strike for another when it mattered most. They exploded for four touchdowns in the first 18 minutes against the Scarlet Knights, but scored just twice over the final 42 minutes.

Maryland’s second-half defense was steady while its offense wavered. Because of that, the Terps have won seven games for the third consecutive season.