DALLAS, Tx (AP) — Aaron Rodgers and the Green Bay Packers are headed to the NFC championship game for the first time since the 2014 season after a thrilling finish in Dallas.

Mason Crosby kicked a 51-yard field goal as time expired, and the Packers edged the NFC’s top-seeded Cowboys 34-31 on Sunday. The kick was set up by a Jared Cook 35-yard reception as he was sliding out of bounds.

READ MORE: WATCH LIVE: Philadelphia Police To Provide Update On Anti-Violence Efforts

Rodgers threw for 320 yards and two touchdowns as the Packers (12-6) won their eighth straight.

READ MORE: Why It Could Be A Good Idea To Ditch Your Exercise Watch

The Cowboys (13-4) rallied twice, first from 18 points down and again after the Packers went up 31-28 with 1:33 left on a 56-yard field goal by Crosby.

But Rodgers had the ball last to set up Crosby for the winning field goal.

MORE NEWS: 'When I Finally Got To Be Elvira, That's When My Life Calmed Down': Mistress Of The Dark Peels Back The Curtain

The Packers will visit Atlanta in Rodgers’ third NFC title game.