ARLINGTON, Texas — Aaron Rodgers was left with a few seconds and one shot at winning it.

That’s more than enough.

The NFL’s hottest quarterback put the Green Bay Packers in position to advance to the NFC Championship and kicker Mason Crosby did the rest, booting a 51-yard field goal at the final gun to beat the Dallas Cowboys 34-31 Sunday afternoon at AT&T Stadium.

The Packers moved on to face the Atlanta Falcons next Sunday, with a spot in the Super Bowl at stake.

The final score came in improbable fashion after the Cowboys tied the game with 44 seconds left. On third down with 12 seconds remaining, Rodgers dialed up some familiar magic.

Scrambling to his left, he rifled a 36-yard completion to Jared Cook, who dragged his toes in bounds at the 33-yard line with 3 seconds on the clock. Mason followed with a game-winner just inside the left upright, after his first attempt right down the middle was waived off after the Cowboys called a timeout right before the snap.

Rodgers finished 28 of 43 for 356 yards and two touchdowns, with an interception, despite being without leading receiver Jordy Nelson.

Cook caught six passes for 104 yards and a score. Ty Montgomery also had six receptions and scored on two short runs.

Dallas’ season ends after earning the No. 1 seed in the NFC and an off week for the first round of the playoffs.

The Dallas stars came to play, especially rookies, quarterback Dak Prescott and running back Ezekiel Elliott. Prescott completed 24 of 38 for 302 yards, three scores and a pick. Elliott rushed 22 times for 125 yards.

Dez Bryant had nine catches for 132 yards and two touchdowns.

The Cowboys rallied from an 18-point second quarter deficit and were in the verge of overtime after Dan Bailey’s 52-yard field goal in the final minute.

But Rodgers proved too much, continuing a run of incredible performances that began in late November. Green Bay reeled off eight straight wins.

After a big first half, the Packers didn’t skip a beat in opening the third quarter with touchdown. Rodgers led his team 75 yards in just six plays, ending with the 3-yard toss to Cook.

The Cowboys needed an answer, and were driving for another score before the momentum swung back to the visitors. With a second-and-1 at the Green Bay 19, Prescott threw a quick slant that was jumped by Green Bay safety Micah Hyde.

The game’s first turnover could have been disastrous for Dallas, but the Packers gave the ball right back. Free safety Jeff Heath picked off Rodgers — his first interception since Nov. 13 — deep in Dallas territory.

Prescott calmly directed a scoring march that ended with a 6-yard pass to Jason Witten and trimmed Green Bay’s lead to 28-20 early in the fourth.

The Cowboys weren’t done. After a rare stop of Rodgers and the Packers, Dallas put together a clutch game-tying possession.

Prescott not only found Bryant on a 7-yard touchdown on third down, the rookie signal-called bullied his way over the goal line for the 2-point conversion.

The Packers went into halftime up 21-13 behind 191 yards passing from Rodgers.

The Cowboys took the opening kickoff and went 43 yards before Dan Bailey nailed a 50-yard field goal.

Green Bay answered with three consecutive touchdown drives covering 75, 90 and 80 yards, respectively. Rodgers put the Packers in front with a 34-yard scoring strike to Richard Rodgers.

Montgomery finished off the next two marches with short runs, as Green Bay opened up a 21-3 advantage midway through the second quarter.

Prescott would get Dallas into the end zone for the first time by hooking up with Bryant. Consecutive long completions to Bryant, the latter covering 40 yards for a touchdown, helped breathe life back into the Cowboys.

Bailey’s 33-field goal late in the second quarter left Dallas down eight points going into the locker room.

NOTES: ESPN reported Sunday the NFL submitted follow-up questions to Cowboys RB Ezekiel Elliott regarding assault accusations made in July by his ex-girlfriend. Elliott is still in the process of responding and no resolution is expected this season, according to the report. … QB Dak Prescott was the first rookie signal caller to start a playoff game in Cowboys franchise history. … Cowboys inactives: QB Mark Sanchez, RB Alfred Morris, OL Jonathan Cooper, DE Richard Ash, LB Mark Nzeocha and CB Leon McFadden. … Packers inactives: QB Joe Callahan, CB Quinten Rollins, RB James Starks, T Kyle Murphy, OL JC Tretter, WR Jordy Nelson and LB Jayrone Elliott.