The Pittsburgh Steelers were about 23 yards from losing their first game of the season but the defense held strong and prevented a game-winning Garrett Gilbert touchdown pass.

The Steelers defeated the Dallas Cowboys, 24-19. Pittsburgh is 8-0 for the first time in history.

But the Steelers needed to dig deep and make a comeback.

NFLPA INVESTIGATING CAMERAS IN JETS' LOCKER ROOM: REPORT

Dallas went into half time up 13-9. Gilbert, in his first career start, had a 20-yard touchdown pass to CeeDee Lamb in the second quarter to go up 13-0. The Steelers would answer with a touchdown pass from Ben Roethlisberger to James Washington and then a Chris Boswell 59-yard field goal.

Pittsburgh Steelers' Cameron Heyward (97) and Bud Dupree, right, rush as Dallas Cowboys quarterback Garrett Gilbert (3) attempts to throw a pass in the second half of an NFL football game in Arlington, Texas, Sunday, Nov. 8, 2020. (AP Photo/Michael Ainsworth)

The Cowboys would tack on two more field goals in the second quarter and really only needed a touchdown to potentially put the game away. Dallas had a 19-9 lead in the fourth quarter.

Like in so many games this season, no lead was safe in the fourth quarter.

PHILIP RIVERS MOCKED AS COLTS QUARTERBACK TRIPPED WHILE TRYING TO TACKLE DEFENDER

Roethlisberger threw the go-ahead touchdown pass with 2:19 remaining in the game to put the Steelers up 24-19. It was the cap to 15 consecutive points in the final period.

Roethlisberger, who briefly left the game because of a knee injury, finished 29-for-42 with 306 passing yards and three touchdown passes. JuJu Smith-Schuster led the way with six catches for 93 yards.

Dallas Cowboys' Donovan Wilson, left front, and Xavier Woods left rear, are unable to stop Pittsburgh Steelers wide receiver JuJu Smith-Schuster (19) from scoring a touchdown after catching a pass in the second half of an NFL football game in Arlington, Texas, Sunday, Nov. 8, 2020. (AP Photo/Michael Ainsworth)

Gilbert wasn’t terrible in his first start. He finished 21-for-38 with 243 passing yards, a touchdown pass and an interception. Lamb had four catches for 71 yards.

Tony Pollard led all running backs with 57 yards on the ground on nine carries.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Pittsburgh is off to the best start in franchise history with its eighth straight victory to start the season.

Dallas falls to 2-7 and have a minuscule lead over the New York Giants in the NFC East.