When Jim Schwartz first came up with the idea for the wide-9 defense, a lot of people looked at him the same way they looked at the first guy who said, “Hey, what if we put the engine in the trunk?’’

“A lot of people thought it was a really dumb idea in the beginning,’’ said Charles Davis, the Fox Sports analyst who will broadcast Sunday’s Eagles-Vikings game with partner Kevin Burkhardt.

“It always looked like you should be able to run the ball against it. But Schwartzy knows what he’s doing. Yeah, you can have the wide-9. But you can have hard edges to it and some of the other things that go along with it.

“And when you have people like Fletcher Cox inside and some of those other guys, it’s not as easy to run the ball against it as you think.’’

You’ll get no argument from the Eagles’ first five opponents this season. Schwartz’s unit is first in the league against the run (63.0 yards per game) and second in opponent rush average (3.2 yards per carry).

It has allowed a league-low 15 rushing first downs and given up just eight runs of 10-plus yards. Only two teams – New England (six) and Chicago (seven) -- have given up fewer.

While those numbers are impressive, we’ll have a much better feel for the true strength of the Eagles’ run defense come Sunday night, after it faces the Vikings and the NFL’s second-leading rusher, Dalvin Cook, at U.S. Bank Stadium -- or as Eagles fans like to refer to the place, 41-33.

When Vikings coach Mike Zimmer fired his offensive coordinator, John DeFilippo, late last season and replaced him with St. Joe’s Prep and Penn product Kevin Stefanski, he gave Stefanski a directive: Run the ball.

Last year under DeFilippo, the Vikings averaged 37.9 pass attempts per game (the league’s sixth most), and just 22.3 rushing attempts (sixth fewest). Through five games this season, they’re averaging 30.6 rushing attempts (fifth most) and 27.4 pass attempts (third fewest).

Led by Cook’s 542 yards, the Vikings are third in the league in rushing (166.4 yards per game) and tied for first in rushing touchdowns (eight).

“If you turn the tape on, that’s all they’re doing,’’ Cox said of the Vikings’ emphasis on the run. “They want to run the football. For the guys up front, we love to play teams that like to run the football.’’

On paper, it looks like two immovable objects about to collide.

“It’s going to be a great match on Sunday,’’ Schwartz said. “A good run defense against an outstanding run offense.’’

Cook is trailing NFL rushing leader Christian McCaffrey by just 45 yards. He’s averaging 5.9 yards per carry. His backup, rookie Alex Mattison, is averaging 5.6 and has 10 rushing first downs on just 34 carries.

“They’ve been running the ball on guys for the last 4-5 weeks,’’ said Eagles defensive tackle Akeem Spence. “Their head coach talks about it all the time. That’s our No. 1 goal Sunday. Slow down No. 33 [Cook] and make them one-dimensional. Make them play left-handed and try to imitate last week [against the Jets] a little bit.’’

The Eagles held the Jets to 67 yards on 19 carries in a 31-6 win. They limited the Jets’ star running back, Le’Veon Bell, to 2.9 yards per carry.

But the 3-2 Vikings aren’t the 0-4 Jets.

“They’re running the ball real good,’’ said Cox. “This is going to be a big test for us.’’

Said linebacker Zach Brown: “They’re going to stick with the run game. They got a high-paid quarterback [Kirk Cousins]. But when you got a running back who’s running the ball like Cook is, why stop?’’

The Vikings’ change in offensive philosophy has made Cook a happy camper, but it’s frustrated their two star wide receivers, Adam Thielen and Stefon Diggs. Thielen, who caught 102 passes last season, has just 20 in five games. Diggs, a defense-stretcher who had nine touchdown receptions last year, has just one so far this year.

Just one team has run the ball more than 20 times against the Eagles this season. That was the Lions, who ran it 28 times (for just 86 yards).

Even with all of the injuries the Eagles have at cornerback – they’re missing three of their top four corners – Davis said the Vikings are going to run the ball a lot on Sunday.

“You can play well against the run,’’ he said. “You can shut it down in the first half and go into the locker room. Then one missed assignment, one good block, one broken tackle, and all of a sudden, things start to go [bad] because those types of teams that stay with it over time, they can wear you down through attrition. Not always, but they can.

“So you’re never really relaxed. Because you know they’re going to try and stay with it. Especially if the scoreboard gives them a chance to do so.’’

Next week, another major rushing challenge awaits the Eagles defense when it faces Ezekiel Elliott and the Cowboys in Dallas. But first, it must figure out an answer for Cook.

“He’s a one-cut back and he’s got great vision,’’ Spence said. “Once he sees the hole, he explodes through it. Some backs, they tippy-toe. With him, it’s north-south.

“Up front, we have to be good with our technique. Be in our gaps. We can’t be jumping out of our gaps. We have to get penetration and make him make an early cut before he wants to.’’

Thielen and Diggs are one of the league’s top wide-receiver tandems. So the Eagles hardly can ignore the pass. Their hope is to neutralize the Vikings on first and second down and put them in obvious passing situations. Cook is averaging a decent 4.0 yards per carry on first down, but he’s averaging an out-of-this-world 9.6 on second down. So those third-and-longs are going to be easier said than done.

“Any defensive coordinator will tell you, there’s nothing more demoralizing than getting gashed by the run, absolutely nothing,’’ Davis said. “If you’re going to give up anything, you’re going to force them to beat you throwing the football.’’

Said Schwartz: “I saw something this week where there were like nine 300-yard passers in the NFL and their teams went something like 4-5. And there were eight 100-yard rushers and their teams went 7-1.

“We’ve always put a big emphasis on stopping the run. When you can do that, that allows your pass rush to be able to go. Our guys pretty well know what to do.’’