There were still 22 minutes left on Christmas night when Jake Elliott's 48-yard field goal cut through the wind and the frigid Philadelphia air to deliver Eagles fans the gift they wanted all week: The No. 1 seed in the postseason.

Elliott's field goal with 22 seconds remaining put the Eagles ahead in a 19-10 win over the Oakland Raiders in an ugly game at Lincoln Financial Field, although it was cornerback Ronald Darby who made the game's biggest play with a diving interception in the final minute to give the Eagles possession at midfield to set up Elliott's game-winning kick.

The Eagles moved to 13-2 and clinched the No. 1 seed with the win, ensuring that any path to the Super Bowl goes through Philadelphia. But it's fair to wonder how far down that path they'll go with the way Nick Foles and the offense played Monday in what Foles called a "crazy, sloppy game."

"We're 13-2 and we still have a lot of room to improve," said Foles, who admitted he did not play well enough. "You feel a lot better when you win it. But you're also very humbled – our defense did an amazing job giving us opportunities at the end to drive the ball down, and Jake made a great kick. But it's something we have to clean up, because we can't go out there and do that."

Even though Foles drove the Eagles 21 yards to set up the field goal, it was the defense that carried the Eagles against the Raiders. They forced five second-half turnovers to spoil Raiders scoring opportunities and bail out an Eagles offense that mustered only 216 total yards.

"Last week, our offense was carrying us and [the defense was] playing like trash," Darby said. "This week, our offense was making little mistakes and we had to come out there and make some plays. And the end of the day, that's what football is all about."

Darby's interception was the one that mattered most. The Raiders took over possession at their 46-yard line with 67 seconds remaining, close enough that a few completions would put them in field goal range. Darby jumped in front of Amari Cooper to give the offense a chance. Foles relied on a few short passes, which wasn't a given during a night when Foles finished 19 of 38 for 163 yards, one touchdown, and one interception.

"You always want to win playing the perfect game, you always want to win throwing seven touchdowns, that's how you want to win," Foles said. "This game was totally different than the last time I played Oakland. …But the good teams find a way to win. And we did tonight."

The Eagles recovered a fumble and ran it in for a touchdown when the Raiders tried for a miracle last-second touchdown to seal the nine-point win.

"Our defense bailed us out, no other way to put it," tight end Zach Ertz said.

It was a step back from last week, but the win counts the same. Ertz was the leading receiver with nine catches for 81 yards. Jay Ajayi was the top rusher with 52 yards. It's not yet known whether the Eagles will play their starters next week against the Dallas Cowboys.

At halftime, Elliott thought the game would come down to a field goal. The rookie kicker, who won a Week 3 game with a 61-yard field goal, ran to the practice net after Darby's interception and was ready when the Eagles sent him on the field for the 48-yard field.

"I knew I hit it really well right off the bat," Elliott said.

The scoring in the final minute capped a second half that wasn't the best representation of either team. Both teams kicked field goals to make it 10-10 at the end of the third quarter, although it was far more suspenseful than the score column suggested. After the Raiders ran seven of eight plays on the opening drive before settling for a 25-yard field goal, the offenses were mostly listless for the remainder of the quarter. They were also sloppy during a sequence when there were three turnovers in 30 seconds.

Patrick Robinson seemed to shift momentum when he jumped in front Seth Roberts on Derek Carr's pass and returned it to the Raiders' 44-yard line to give the offense a good scoring opportunity. But the Raiders took the ball right back when Jay Ajayi was stripped at the end of a 14-yard rush, thwarting that scoring chance.

Fans were cheering before they could finish voicing their displeasure. On the Raiders' first play, Vinny Curry and Mychal Kendricks knocked the ball away from Lynch and Rodney McLeod recovered the fumble to give Foles the ball back at the 30-yard line. The offense didn't turn the ball over, but it didn't score a touchdown. Foles and the offense could muster only 13 yards, and Elliott's 35-yard field goal tied the game.

The same ping-ponging of turnovers continued in the fourth quarter. After the Raiders missed a 48-yard field goal, Pederson called a high-percentage pass for Foles. Foles still threw an interception. He sailed a short dump-off pass to Ertz too high, and safety Reggie Nelson caught the deflection to give Oakland the ball back in Eagles territory. The defense responded again – this time, when Malcolm Jenkins stripped Raiders running back Jalen Richard at the 16-yard line to preserve the tied score before the final minute.

"It was just one of those games where our defense needed to get some stops for our offense to put some points on the board and put us in a position to win," Jenkins said.

In the first half, the Eagles scored on their second drive when they went 58 yards on 11 plays, including nine rushes. That set up a 17-yard touchdown on a screen pass to Ajayi, and it appeared that the Eagles could overpower the Raiders. But that didn't happen, and the Eagles couldn't score again until late in the third quarter.

The Raiders tied the game when Carr hit Cooper on a 63-yard touchdown after cornerback Jalen Mills bit on a slant-and-go pattern to leave Cooper uncovered for the easy score. It was the same type of pattern that the New York Giants hurt the Eagles with last week, and it won't be the last time the Eagles see it this season. Opposing offensive coordinators could try to burn the aggressive cornerbacks with the same pattern come playoff time.

Those were the only touchdowns until the final seconds of the game, when the Eagles started their celebration on a night that could have easily ended without one.

After the game, someone congratulated Pederson – and the coach was quick to remind anyone around that the Eagles did, in fact, win. It might have been ugly, but they're still the No. 1 seed.

"Every team now in the postseason…is coming right through here," Pederson said. "That's what we wanted. That's what our goal was this week, and we wanted to finish the game that way. And we did. We're excited about it."

Get insights on the Eagles delivered straight to your inbox with Early Birds, beat writer Zach Berman's newsletter for Eagles fans. Click here to sign up.