UNDATED (AP) — The New Orleans Saints and Jacksonville Jaguars have advanced to the NFL's divisional round by winning at home on Sunday.

The Saints will face the Minnesota Vikings Sunday afternoon in Minneapolis (3:40 start).

Drew Brees threw for 376 yards and two touchdowns before the Saints' defense clamped down on Carolina's final possession to complete a 31-26 win over the Panthers.

Ted Ginn Jr. had an 80-yard scoring reception to open the scoring late in the first quarter, putting New Orleans ahead to stay. Josh Hill added a nine-yard scoring reception, while Alvin Kamara and Zach Line added short TD runs. Michael Thomas caught eight passes for 131 yards, including a 46-yard grab to set up Kamara's scoring run that put New Orleans ahead 31-19 with 5:08 remaining.

Cam Newton connected with Christian McCaffrey on a 56-yard touchdown pass that got the Panthers within 31-26. Carolina later had first down on the Saints 26 with 58 seconds left, but the drive ended when Vonn Bell sacked Newton to secure New Orleans' first playoff win in four years.

Newton was 24 of 40 passing for 349 yards and two touchdowns.

The Jaguars limited the Bills to a second-quarter field goal in a 10-3 victory that puts Jacksonville in the divisional round for the first time since January 2008. The Jags' defense bailed out an offense that had just two scoring drives and was held to 230 total yards. Jacksonville clinched the victory when Jalen Ramsey intercepted Nathan Peterman's pass in the final minute.

Peterman entered the game after Tyrod Taylor slammed his helmet hard against the ground while being tackled by Dante Fowler Jr. with 1:27 left.

Jaguars quarterback Blake Bortles averaged just 3.8 yards per pass attempting, completing 12 of 23 for 87 yards. But he ran for a team-high 88 yards and put Jacksonville ahead by hitting tight end Ben Koyack for a one-yard touchdown late in the third quarter.

LeSean McCoy had 119 total yards and carried 19 times for 75 yards after missing practice last week with an ankle injury.

Jacksonville will travel to Pittsburgh to take on the Steelers next Sunday.