Michigan State quarterback Aidan Chiles arrived in College Park on Saturday as an 18-year old quarterback, making his second career start after throwing for only 118 yards in his season debut. A veteran Maryland defense had a prime opportunity to make an early-season statement.

Instead, Chiles threw for 363 yards, three touchdown passes and orchestrated a game-winning scoring drive to upset Maryland 27-24.

After Terps kicker Jack Howes missed a 41-yard field goal, Chiles delivered a perfect 77-yard touchdown pass to tie the game. He then drove the Spartans 65 yards down the field in just over two minutes to set up a 36-yard field goal to take the lead with just one second remaining.

“Aidan Chiles, our goal was to make him beat us throwing and he did that today,” Locksley said.

Michigan State (2-0) and Maryland (1-1) are in much different places as football programs. The Spartans are amid a rebuild following the firing of former coach Mel Tucker, while Terps coach Michael Locksley is entering his sixth season off three straight bowl game appearances.

But Michigan State played like the cleaner team on Saturday and won because of it. It didn’t commit multiple special teams or third-down penalties like Maryland did. Jonathan Smith — in his first season as the Spartans’ coach — made aggressive decisions, while Locksley played passive on multiple fourth down and ones.

[Glen Miller is Maryland football’s ‘poster child’ for player development]

Maryland looked like it had the game in hand multiple times. Yet Chiles repeatedly decimated the Terps secondary, completing touchdown passes of 77 and 34 yards. Both of Maryland’s starting outside cornerbacks, Perry Fisher and Jalen Huskey, were beat for touchdowns on throws across the middle of the field.

Three interceptions from Huskey and Glen Miller masked the Terps coverage issues. In defensive coordinator Brian Williams’s scheme, the cornerbacks need to play well in man coverage.

“We could have respected the deep part of the field and as DB’s, [our job] is limit explosives,” safety Dante Trader Jr. said. “It was just one on ones.”

Williams tried different options. Freshman defensive backs Braydon Lee and Kevyn Humes played significant snaps in the first half as well. Neither excelled.

“We got to grow up a little bit at that position,” Locksley said.

Maryland’s secondary struggled, but its pass rush played just as poorly. Chiles had multiple seconds to find open receivers on a majority of his dropbacks. The Spartans also rushed for 4.3 yards per carry.

A lackluster defensive performance forced Maryland’s offense to deliver. Billy Edwards Jr. responded by completing 76 percent of his passes, but threw a costly interception in Spartans territory in the fourth quarter.

[Maryland football can’t ease into its schedule with early Big Ten test]

The Terps’ reliance on Edwards was needed as they failed to run the ball effectively. An entirely new starting offensive line struggled to create consistent holes against a Big Ten front, one that limited Florida Atlantic to 2.8 yards per carry in Week 1. Roman Hemby and Nolan Ray combined to rush for 55 yards on 20 attempts.

Because of that, at a critical juncture, Locksley passed on trusting his offense.

“When you see that type of cover inside, it didn’t give me confidence to line up and knock them off the ball,” Locksley said.

Facing a fourth and one from the Michigan State 23-yard line, the coach elected to attempt a field goal. Howes missed it, and Chiles delivered a touchdown on the next play.

Locksley and Williams said in the preseason Maryland would be a defensive-oriented squad. The unit returned a majority of its starters, including Jordan Phillips, Ruben Hyppolite II and Trader.

But in the Terps’ first Big Ten contest, facing a team that mustered 293 total yards of offense in its season opener, the defense floundered. And when Jonathan Kim’s 36-yard field goal passed through the uprights, it ended one of the most disappointing losses in the Locksley tenure.