The spotlight that has been on the Marietta football team throughout the early part of the high school football season is about to get a lot brighter.

The Blue Devils, facing a Philadelphia powerhouse and trailing by three points with just over a minute remaining, drove 66 yards in five plays, scoring on a 23-yard pass from Harrison Bailey to Ricky White with 14 seconds left to beat St. Joseph’s Prep 21-17 Friday night at Northcutt Stadium.

This game matched teams with at least one top-10 national ranking and was televised nationally by ESPNU. Marietta was ranked as high as No. 9 by USA Today this week, and St. Joseph’s was No. 4 in High School Football America’s rankings. The teams didn’t disappoint.

“It means everything,” Marietta coach Richard Morgan said. “We’ve been working really hard to turn this program around, and to come out here and beat that team in front of a sold-out crowd and on national TV says so much about our kids, their love for each other and their character and their fight. I’m very, very proud of them.”

Marietta (2-0) had led throughout the second half after Bailey’s 39-yard touchdown pass to Arik Gilbert capped of the Blue Devils’ opening drive of the third quarter and put them ahead 14-7.

St. Joseph’s pulled with 14-10 on a 22-yard field goal by Antonio Chadha with 1:50 remaining in the third quarter, then took its only lead of the second half on a 12-yard touchdown pass from Kyle McCord to Sahmir Hagins with 1:18 to play.

The Hawks’ lead didn’t last long. St. Joseph’s was penalized for unsportsmanlike conduct following the touchdown, and Marietta’s Rashun Bass returned the ensuing kickoff 27 yards to the Marietta 34. After an incomplete pass, Bailey ran for 13 yards for a first down and followed with a 30-yard completion to White that moved the ball to the St. Joseph’s 22. On second down, Bailey found White with the game-winner.

Bailey was 17-of-34 passing for 259 yards and two touchdowns. Gilbert had six receptions for 117 yards, and White caught five passes for 80 yards. Kimani Vidal rushed for 77 yards on 16 carries.

Despite the usual big numbers from his offense, Morgan said his defense was the key to the victory. Nine of St. Joseph’s possessions ended in Marietta territory but only three produced scores.

“That quarterback’s going to Ohio State and the receiver [Marvin Harrison Jr., the son of a Hall-of-Famer] is an all-American, and they made some plays, but the defense just kept coming and kept coming and making big plays. They never gave up. That’s how we have to play defense, everybody rallying together.”

Marietta gave up an average of 29.6 points per game last season, including 51 and 40 in two season-opening losses. In their first two victories this season, the Blue Devils have allowed just 31 total points.

McCord was 20-of-33 passing for 249 yards and two touchdowns. Harrison was his main target, with seven receptions for 107 yards. Kolbe Burrell ran for 98 yards on 22 carries.

The loss was just the second in four years for St. Joseph’s, which went 40-1 with two Pennsylvania championships in the past three seasons.

The defenses controlled the action for about a quarter and a half, but a key fourth-down play midway through the second seemed to bring both offenses to life. Facing fourth down and less than a yard just short of midfield, St. Joseph’s Burrell broke off a 22-yard run. McCord hit Malik Cooper with a 29-yard touchdown pass on the next play, giving the Hawks a 7-0 lead with 5:10 remaining in the half.

Marietta answered with an 11-play, 80-yard touchdown drive that pulled the Blue Devils even heading into halftime. A 16-yard pass to Gilbert moved the ball down to the 2-yard line, and, after St. Joseph’s jumped offside three consecutive times, Vidal took it in from less than a yard out to make it a 7-7 game.

St. Joseph’s - 0-7-3-7 - 17

Marietta - 0-7-7-7 - 21

Second quarter

S - Malik Cooper 29 pass from Kyle McCord (Antonio Chadha kick), 5:10

M - Kimani Vidal 1 run (Cooper Kipp kick), 1:10

Third quarter

M - Arik Gilbert 39 pass from Harrison Bailey (Kipp kick), 9:03

S - Chadha 22 field goal, 1:50

Fourth quarter

S - Sahmir Hagans 12 pass from McCord (Chadha kick), 1:18

M - Ricky White 23 pass from Bailey (Kipp kick), 0:14