The NFL’s last undefeated team barely made it out of Dallas unscathed on Sunday afternoon.
Ben Roethlisberger and the Pittsburgh Steelers, after trailing most of the contest, snuck out of AT&T Stadium with a 24-19 win against the Cowboys thanks to a late touchdown and key stop in the final minutes.
Garrett Gilbert, Cowboys surge early
Things have been rough for the Cowboys since they lost Dak Prescott to a gruesome ankle injury last month, to say the least.
The team has cycled through replacement quarterbacks ever since, briefly using Andy Dalton, who was sidelined due to a concussion, and rookie Ben DiNucci, who couldn’t get things going in their loss to the Philadelphia Eagles last week.
Finally, it seemed that Gilbert might be the answer.
The former SMU standout was signed by the Cowboys last month, which marked his seventh team in the league since he was selected by the St. Louis Rams in 2014. Headed into Sunday, however, the 29-year-old had played in just six games and attempted only six passes.
Despite his inexperience, Gilbert got the Cowboys off to a 10-0 lead — thanks largely to a perfect 20-yard touchdown pass to CeeDee Lamb early in the second quarter.
Ben Roethlisberger, Steelers rally late
That, though, is when the Steelers finally kicked it into gear.
Roethlisberger found James Washington for a 17-yard touchdown late in the second quarter, which set up a quick 9-0 run to close out the half. Pittsburgh kicker Chris Boswell missed the extra point after that score. Roethlisberger briefly left the game near the end of the first half with what appeared to be a banged-up knee. He returned in the second half.
Then, after holding Dallas to a pair of field goals in the third, Roethlisberger found a wide open JuJu Smith-Schuster for a 30-yard touchdown to open the fourth quarter and bring them back within four — as Boswell’s extra point was then blocked.
Dallas running back Rico Dowdle came up with a massive 64-yard kick return, setting up what looked like a drive to keep the Cowboys in control. Gilbert, however, was picked off in the end zone by Minkah Fitzpatrick — which led to an 11-play, 55-yard drive capped with a field goal to bring them within one.
After quickly stopping the Cowboys to get the ball back, Roethlisberger connected with Diontae Johnson for 42 yards and then found Eric Ebron for an 8-yard score, giving Pittsburgh its first lead of the game with just 2:14 left on the clock.
Gilbert nearly pulled off an incredible winning drive in the final seconds, connecting with Lamb for a 32-yard gain and then with Michael Gallup for another 20 yards to bring them into position.
His final attempt, however, was knocked down by Fitzpatrick to seal the five-point win for the Steelers.
Roethlisberger finished 29 of 42 for 306 yards and three touchdowns. Gilbert went 21 of 38 for 243 yards with a touchdown and an interception. Tony Pollard led Dallas on the ground, racking up 57 yards on nine carries.
More from Yahoo Sports: