DALLAS – Mason Crosby’s walk-off 51-yard field goal gave the Packers a wild 34-31 victory over the Cowboys in the NFC Divisional playoff on Sunday at AT&T Stadium.

Both teams kicked field goals in the final two minutes that tied the game at 31, and Packers QB Aaron Rodgers drove the Packers into Crosby’s range with just 35 seconds on the clock when the possession began.

With the win, the Packers advanced to the NFC title game in Atlanta next Sunday.

Rodgers finished 28-of-43 for 356 yards with two TDs and one interception for a 96.7 rating. TE Jared Cook, whose 35-yard reception set up the winning kick, had six catches for 104 yards and a TD. WR Davante Adams added five catches for 76 yards, and WR Randall Cobb had seven grabs for 62 yards. RB Ty Montgomery rushed for 47 yards on 11 attempts and added 34 receiving yards on six catches.

For the Cowboys, QB Dak Prescott was 24-of-38 for 302 yards with three TDs and one INT for a 103.2 rating. RB Ezekiel Elliott had 22 carries for 125 yards, and WR Dez Bryant had nine catches for 132 yards and two scores. WR Terrance Williams added four catches for 68 yards, TE Jason Witten had six catches for 59 yards and a TD, and WR Cole Beasley had four catches for 45 yards.

Here’s a quarter-by-quarter recap of the action.

Fourth quarter:

The Cowboys started the fourth quarter in Green Bay territory and got into the red zone on a 19-yard pass to Williams. Packers LB Nick Perry sacked Prescott on second down, but Prescott found Witten for 15 yards to convert on third-and-14 and make it first-and-goal on the 6. Witten caught a TD pass on the next play, and the Cowboys were back within eight points at 28-20 with 11:39 to go.

The Packers began their next drive with a 19-yard pass to Cook, but Rodgers was sacked by S Barry Church on the ensuing third down, and the Packers had to punt.

A 15-yard completion to Bryant got the Cowboys going again, and an 8-yard run by Elliott picked up another first down. Elliott ran up the middle for 12 yards to the Green Bay 39, and a 10-yard pass to Witten moved the chains again. CB LaDarius Gunter was called for pass interference on Bryant on third-and-8, and the Cowboys got another first down on the Green Bay 15.

Elliott spun away from LB Clay Matthews in the backfield and picked up 8 yards to the 7, and Prescott lofted a TD pass to Bryant on third-and-2. Prescott ran a QB draw for the two-point conversion, and the game was tied at 28 with 4:08 left.

The Packers got going on a 16-yard pass to Adams, who was down and being attended to after the tackle. Adams limped off slowly. Montgomery ran for 9 yards to get the ball to midfield. Rodgers picked up a first down at the Dallas 45 with a read-option run, taking it to the two-minute warning.

A defensive pass interference penalty on Cowboys CB Anthony Brown against Montgomery gave the Packers 10 more yards to the 35. Montgomery ran for 2 but then lost 5, making it third-and-13 from the Dallas 38, with the Cowboys using their first two timeouts. A third-down pass for Adams, who returned to the game, was incomplete, and K Mason Crosby was good from 56 yards out to put the Packers ahead, 31-28, with 1:33 to go.

The Cowboys wasted no time, as Prescott hit Williams for 24 yards and Witten for 11 yards to the Green Bay 40. Prescott spiked the ball with 48 seconds left. A 7-yard pass to Beasley made it third-and-3, and LB Nick Perry batted down Prescott’s pass at the line of scrimmage. K Dan Bailey was good on a 52-yard field goal, re-tying the game at 31 with 35 seconds left.

Montgomery picked up 17 on a screen pass to the 42, but S Jeff Heath sacked Rodgers for a 10-yard loss, and the Packers called timeout with 18 seconds left. Rodgers then rolled left and found Cook along the sideline for 35 yards, as Cook tip-toed in bounds, confirmed after replay review. That put the ball on the Dallas 33 with 3 seconds left.

Crosby was true from 51 yards out, and the Packers prevailed.

Third quarter:

The Packers scored to open the third quarter and took a 28-13 lead into the fourth as both teams traded interceptions in Sunday’s NFC Divisional playoff against the Cowboys at AT&T Stadium.

The Packers began the second half with a 25-yard pass to WR Randall Cobb to midfield. On third-and-3, QB Aaron Rodgers found WR Davante Adams for 14 yards to the Dallas 29. Rodgers then hit TE Jared Cook for 26 yards to make it first-and-goal from the 3, and Rodgers found Cook again on play-action for the touchdown. K Mason Crosby’s PAT pushed the Packers’ lead to 28-13 with 11:25 left in the quarter.

RB Ezekiel Elliott got the Cowboys’ next drive started with a 22-yard run up the middle, and QB Dak Prescott barely avoided a sack by LB Nick Perry in completing a 12-yard pass to TE Jason Witten. A deep ball for WR Terrance Williams was nearly picked off by S Kentrell Brice, and Prescott scrambled for a first down on third-and-5. Elliott ran 9 yards to the Green Bay 19, but DB Micah Hyde stepped in front of a screen to WR Cole Beasley, and the Packers got the ball back.

Hyde’s INT return was to the Green Bay 39, and the Packers got to midfield on a third-down pass to RB Ty Montgomery. Rodgers then scrambled up the middle for 11 yards and another first down. But on third-and-8 from the Dallas 38, Cowboys S Jeff Heath cut in front of WR Davante Adams on a go route and intercepted Rodgers. It was Rodgers’ first INT since the Tennessee game back in November. It ended a streak of 318 pass attempts without a pick.

Heath returned the pick to the Dallas 41 with 2:19 left in the quarter. A holding penalty on Cowboys RT Doug Free on first down pushed Dallas back, and Packers DT Kenny Clark brought down Elliott for a loss of 2 on a screen pass. But Prescott found WR Dez Bryant for 19 yards to set up third-and-2, and Bryant caught another one for 10 yards and a first down on the final play of the quarter.

Second quarter:

DALLAS – The Cowboys cut into a big lead the Packers had established, and the first half of Sunday’s NFC Divisional playoff ended with Green Bay ahead, 21-13.

Beginning the second quarter on the Dallas 9, the Packers made it first-and-goal on the 3 with a 6-yard pass to RB Ty Montgomery. On second down, Montgomery plowed in for the rushing TD to cap the 13-play, 90-yard drive, and the Packers led 14-3 with 14:05 left in the half.

The Packers’ defense responded with a three-and-out. WR Terrance Williams dropped a pass, RB Ezekiel Elliott gained just 2 yards, and LB Clay Matthews’ pressure forced an incomplete pass, leading to another Dallas punt.

The offense got going again on an 11-yard pass to WR Geronimo Allison, and then on third down, Cowboys CB Morris Claiborne was called for hands to he face on WR Davante Adams, giving Green Bay another first down. A 26-yard pass to Allison off a scramble to the right moved the Packers into scoring range.

FB Aaron Ripkowski broke off a 20-yard run to make it first down on the Dallas 11, and a 10-yard completion to Adams made it first-and-goal from the 1. Montgomery finished it off for the touchdown, but LT David Bakhtiari went down on the play after he got rolled into. He was down for a bit but limped off under his own power. K Mason Crosby’s PAT put the Packers up 21-3 with 7:37 left in the half.

Bakhtiari was reported to have a knee injury, return questionable.

The Cowboys got moving on a 9-yard run by Elliott and a 21-yard back-shoulder pass to WR Dez Bryant. Then QB Dak Prescott hit Bryant over the top for a 40-yard touchdown, and just like that Dallas was back in it. The 94-second drive pulled the Cowboys within 21-10 with 6:03 left in the half.

Packers RB Christine Michael muffed the ensuing kickoff, forcing the offense to start on its own 6-yard line. The Packers were stopped for the first time in the game, going three-and-out, and after the punt the Cowboys took over at their own 49.

Prescott scrambled for a first down on third-and-2, and the Cowboys were inside the Green Bay 40. A 6-yard pass to WR Cole Beasley made it third-and 4 from the 33 at the two-minute warning.

Prescott found Beasley for 15 yards over the middle to convert, but the Packers got the stop. Prescott threw incomplete three straight times to TE Jason Witten, with LB Joe Thomas breaking up the third-down throw. K Dan Bailey was good from 33 yards out, and the Cowboys were within 21-13 with 1:00 on the clock.

Bakhtiari came back  into the game for the Packers on their final series of the first half, but the Packers didn’t go anywhere. Rodgers was sacked on third down

First quarter:

The Packers took advantage of a free play to score a touchdown and take a 7-3 lead after one quarter over the Cowboys on Sunday in the NFC Divisional playoff at AT&T Stadium.

The Cowboys got the ball first and got across midfield on the strength of two RB Ezekiel Elliott runs for 9 yards and a pair of 13-yard passes to WR Terrance Williams and WR Dez Bryant. But Packers DB Micah Hyde sacked QB Dak Prescott on first down, and CB LaDarius Gunter broke up a third-down pass for Bryant. Gunter collided with S Morgan Burnett on the play and was down for a while but got up and walked off under his own power.

On fourth-and-2 from the Green Bay 32, the Cowboys decided to kick a field goal, and K Dan Bailey was good from 50 yards out to make it 3-0.

The Packers came right back. QB Aaron Rodgers caught the Cowboys with 12 men on defense to convert a third-and-5 before RB Ty Montgomery broke a 15-yard run and WR Randall Cobb slipped free for a 16-yard catch-and-run. On first down from the Dallas 34, the Cowboys jumped offside, and Rodgers was able to find TE Richard Rodgers for a TD pass, putting the Packers up 7-3 with 8:58 left in the first.

The Cowboys went right back to Elliott, as he ran four times for 21 yards and Williams caught a 12-yard pass. But Dallas WR Brice Butler was called for unsportsmanlike conduct, moving the ball back to the Dallas 48. Hyde broke up a deep ball for Butler on second-and-20, and Prescott overthrew Butler on third down, forcing the Cowboys to punt.

Taking over on their own 10, the Packers got out of the hole with a 14-yard pass to TE Jared Cook on third-and-7. Rodgers converted the next third down with a 9-yard pass to WR Geronimo Allison, and an 8-yard pass to Cobb got the Packers to midfield. On third-and-2, Rodgers found WR Davante Adams for 32 yards to the Dallas 17.

Cobb picked up 8 yards on a pass reception on the final play of the first quarter, putting the Packers on the Dallas 9 as time expired.