Chip Kelly had the NFL’s No. 1 running attack, and its leading rusher was coming off a franchise-record 217-yard performance. And yet the Eagles coach couldn’t help himself.

He was going to throw the ball early and often against a sorely depleted Vikings secondary that included Shaun Prater, an Eagles castoff two months ago, making his NFL starting debut in only his sixth game as a pro.

Quarterback Nick Foles dropped back to pass 52 times, throwing 48 passes and getting sacked four times. Meanwhile, running back LeSean McCoy, who came in with 1,305 rushing yards and a 5.0-yard average, ran the ball only eight times while finishing second on his team in rushing yards (38) behind Foles (41).

Yes, the red-hot Foles got his yards. He threw for 428 yards and three touchdowns on 30 completions. But he also threw an interception, settled for two red-zone field goals, saw his protection break down at key moments and couldn’t overcome nine penalties for 94 yards in a 48-30 upset loss at Mall of America Field.

“We came out and tried to execute the plan [to throw the ball], but it did not work,” receiver DeSean Jackson said. “They played better than us.”

The Vikings figured to be the frustrated team at the start of the day. Even though the game marked the return of free safety Harrison Smith, starting cornerbacks Chris Cook (knee) and Xavier Rhodes (ankle) were inactive.

So when the Vikings opened in their nickel package, it included Prater, who was signed on Oct. 22; punt returner Marcus Sherels, making his fifth career start at corner; and nickel back Robert Blanton, a safety making his fourth appearance as an NFL corner.

Before long, however, the Eagles fell behind and clearly were more visibly frustrated. There were sideline theatrics after Foles floated a deep ball to Jackson at the Vikings 5-yard line early in the third quarter.

“That ball took forever to come down,” said Prater, who beat Jackson to the ball for his first career interception, one more than Cook has had in four seasons.

Television cameras caught Jackson arguing with teammates on the sideline. There was speculation that teammates were telling him he should have fought to break up the interception.

“The football family is dysfunctional at times,” Eagles receiver Jason Avant said. “Everybody is trying to be perfect and do their job. It is fun because we have learned how to make it fun. But at times it gets strenuous. Sometimes, the cameras catch that, but it was not that big a deal.”

Jackson came into the game ranked 10th in the league in receiving yards (1,080). He picked up another 195 yards, including a 30-yard touchdown, on 10 catches. But, as Prater proved, even a depleted secondary can make opponents bicker among themselves on the sideline.

“It was just part of the game with a lot of emotions involved,” Jackson said. “I cannot really discuss what happened. I am just upset that we lost the game. We felt like we should have won.”