The Miami Dolphins had cut Seattle’s lead to two points midway through the fourth quarter, and the 13,000 fans at Hard Rock Stadium — the first time this year the Seahawks had played before any spectators — were doing what they could to rock the place hard.

And suddenly, quarterback Russell Wilson couldn’t hear a thing.

It wasn’t because of the fans in Miami, though.

Instead, Wilson’s headset went out on the first play of the next drive, leaving him unable to hear the play calls from offensive coordinator Brian Schottenheimer up in the coach’s box.

No matter.

The famously unflappable Wilson took the play-calling duties into his own hands and calmly led a 75-yard scoring drive that gave Seattle the cushion it needed to beat Miami 31-23 Sunday.

Seahawks 31, Dolphins 23

More

“You don’t freak out,’’ Wilson said of the faulty headsets. “You just know what we want to do and how we want to attack them and you go do it.’’

Wilson capped the six-play drive with a 17-yard touchdown pass to David Moore that made it 24-15 with 5 minutes, 24 seconds left. A few plays later, Shaquill Griffin picked off a Ryan Fitzpatrick pass, and Seattle drove quickly for another score — from a yard out by Chris Carson — with four minutes left and that was basically that.

The victory made Seattle 4-0 for only the second time in franchise history, the other coming in 2013. That team went on to win the Super Bowl behind an historically great defense.

Advertising

This team, as linebacker K.J. Wright — one of two defensive starters left from that team — said later, has “completely flipped’’ the script from a defense that was “shutting teams down’’ to an offense that “is unstoppable.’’

For the first time this year, though, there was a little bit more of a melding of those two formulas.

A defense that had been allowing almost 29 points a game didn’t give up a touchdown until there was 1:50 left, and forced two turnovers that led to 14 points.

Until Miami’s late touchdown, the Seahawks had allowed only five field goals, using a little bit more of a passive approach — less blitzing and more dropping players in coverage a little bit deeper — to perfect a bend-but-don’t-break style that might really fit this Seattle team, given how well the offense has been playing.

“We knew that we had to sink back, keep everything in front of us,’’ Wright said.

After giving up four plays of 40 yards or more last week and seven of 28 or more, Seattle didn’t allow any play of longer than 26 against Miami, and only one of longer than 21 yards.

Advertising

“We really kept them in front of us and made them work their way down,’’ said Seahawks coach Pete Carroll, who had seemed visibly frustrated last week at the manner in which Seattle was giving up big plays in uncharacteristic bunches.

And Seattle did it Sunday despite playing without injured strong safety Jamal Adams and cornerback Quinton Dunbar, whose absences probably contributed to the Seahawks playing it a little more safe — on one third-and-10 late in the game Seattle dropped nine into coverage. Fitzpatrick ran for a first down, but the broader point was that the Seahawks were protecting the end zone at all costs.

“So that’s an improvement,’’ Carroll said.

When it came to Wilson, though, it was pretty much more of the same. True, he threw his first real interception of the season on a pass to DK Metcalf in the end zone in the third quarter and took a sack on a fourth-down play late in the first half (Wilson said of the interception by Xavien Howard, “I thought it was going to be a touchdown when I threw it. He made a good play on that one.’’).

Otherwise, this was another MVP-level performance, as he threw two more touchdown passes Sunday for 16 this season to tie Peyton Manning in 2013 for the most in the first four games in NFL history (Manning finished that season with an NFL-record 55).

And his biggest plays came at the most important times. After Miami cut the lead to 10-9 with 24 seconds to go in the half, Wilson led a 75-yard drive in 21 seconds, sparked by a play in which he scrambled and hit Moore for 57 yards.

Then, after the scoreless third quarter — only the second for Seattle this year, the other coming in the second quarter at Atlanta — and the Miami drive that cut it to 17-15 came the drive in which Wilson suddenly also had to be the playcaller.

Advertising

“First play of the drive, it just went out and I couldn’t hear anything,’’ Wilson said. “So I just started calling the plays on those.’’

As Wilson noted later, he has wide latitude to change plays on the field all the time, and during two-minute drills often calls the plays at the line, so it’s not an unfamiliar task.

Still, if there was a tense moment in the game, and at a time when the Seahawks most needed things to be perfect, that was it.

Wilson got the drive going with a first-down pass to Tyler Lockett for 9 yards. Then, after a Carson run of 8 — on a day when Carson shook off the knee injury of last week and getting the wind knocked out of him in the second quarter to give Seattle some tough yards Sunday — Wilson hit Lockett for 30.

Then came a 2-yard run by rookie DeeJay Dallas, a pass for 9 yards to Dallas and the touchdown in the back of the end zone to Moore, part of a fourth quarter in which Wilson was 5 for 5 for 97 yards, one touchdown and a perfect passer rating of 158.3.

Maybe Wilson would always have been able to seamlessly and suddenly add on-field play-calling duties to all of his other roles.

Sponsored

But he acknowledged later that the experience gained over the years helped.

“There was never any panic there,’’ Wilson said. “Definitely in Year 9 you know so much of the game, so much of what they are trying to do and what they are trying to disguise and all that stuff and just take advantage of the looks.’’

As almost everything else he’s done this season, it apparently was just that easy.