STARKVILLE, Miss. -- Mississippi State brought the all-out blitz. Alabama's Jalen Hurts never flinched.
Throwing two perfect passes with less than a minute remaining, the sophomore quarterback carved through Mississippi State's defense and helped deliver a precarious victory for the top-ranked Crimson Tide on Saturday night.
Hurts hit DeVonta Smith for a 26-yard touchdown pass with 25 seconds remaining to lift Alabama over No. 18 Mississippi State 31-24 and save the Tide's undefeated season. On the play before the touchdown -- and facing a 3rd-and-15 -- Hurts found Calvin Ridley over the middle for a 31-yard gain, just a split-second before Mississippi State's defense crushed the pocket.
"We did a good job of staying together, being one and staying cool and calm," Hurts said. "We did enough."
Alabama (10-0, 7-0 SEC, CFP No. 2) won its 10th straight game against Mississippi State, but this one was much more difficult than most of the others.
Mississippi State (7-3, 3-3, CFP No. 16) pushed ahead 24-17 early in the fourth quarter on Jace Christmann's 25-yard field goal, but Alabama responded to tie it at 24 when Damien Harris ran for a 14-yard score with 9:49 left. Alabama had a chance to take the lead with about two minutes left, but a 41-yard field goal attempt by Andy Pappanastos banged off the left upright and fell to the turf.
Mississippi State went three-and-out on the ensuing drive and Alabama took over with 1:09 remaining. That was more than enough time for the Tide, who drove six plays and 68 yards in 44 seconds for the game-winning score.
Hurts said he changed the play on the third down pass that went to Ridley. The star receiver was hesitant at first.
"I saw something in the defense, so I told him to run the route I wanted him to run," Hurts said. "He kind of shook his head no at first, and I said, `Trust me, I got you."
Alabama coach Nick Saban wasn't particularly pleased with parts of his team -- especially on defense -- but he was relieved it responded well to some adversity.
"Sometimes you need hard," Saban said. "If we're going to beat really good teams, if we're going to compete, we've got to learn how to compete in close games where every play counts. Where you've got to play every play for 60 minutes."
The game was tight throughout with neither team leading by more than a touchdown. Mississippi State pushed ahead 7-0 in the first quarter on an 11-yard touchdown run by Aeris Williams. It was the first touchdown the Bulldogs had scored against Alabama since 2014 and the first time they'd taken the lead against the Tide since 2008.
Alabama's defense has been dominant for most of the season, but several injuries at linebacker throughout the season finally appeared to take a toll. Mississippi State's power running game gained 172 yards, but in the end Alabama was able to slow the Bulldogs down.
"It hurts," said Mississippi State quarterback Nick Fitzgerald, who threw two Hail Mary attempts to no avail in the closing moments. "It doesn't matter who we lost to or how much we lost by, we lost a game we should have won."
Mississippi State coach Dan Mullen -- who is now 0-9 against the Tide -- said he didn't regret the team's decision to try and put pressure on Hurts late.
"We are an aggressive defense," Mullen said. "We came after them. That's our style. We are not going to charge our style or get conservative."
Alabama: The Crimson Tide found a way to survive arguably their toughest test of the season. Hurts completed 10 of 19 passes for 242 yards and a touchdown. Ridley caught five passes for 171 yards.
Mississippi State: The Bulldogs did just about everything right except for win the game. Fitzgerald completed 13 of 24 passes for 158 yards and ran for 66 yards and a touchdown. Williams ran for 97 yards and two touchdowns.
Alabama hosts Mercer next Saturday.
Mississippi State plays at Arkansas next Saturday.
More AP college football: http://collegefootball.ap.org and http://www.twitter.com/AP-Top25 .
Kyler Murray wins the Heisman Trophy
Oklahoma QB Kyler Murray wins the 2018 Heisman Trophy, making it back-to-back years a Sooner has won the award.
E. Washington shocks UC Davis 34-29 with late TD in FCS
Eric Barriere accounted for four touchdowns and Sam McPherson scored on a 35-yard run with 26 seconds left to lift third-seeded Eastern Washington to a 34-29 win over sixth-seeded UC Davis on Saturday in the FCS quarterfinals.
Alabama flips safety Daxton Hill from Michigan, CB Jeffery Carter from Texas A&M
With less than two weeks until the early signing period, Alabama flipped commitments from two of the country's top defensive back recruits, safety Daxton Hill and cornerback Jeffery Carter.
EWU's McPherson walks in go-ahead 35-yard TD
Sam McPherson avoids UC Davis' defenders for an easy 35-yard go-ahead Eastern Washington touchdown.
UC Davis RB powers in 3-yard TD
Jake Maier tosses it to Ulonzo Gilliam who powers in a 3-yard UC Davis touchdown.
Army beats Navy for third straight season to improve to 10-2
Army had the corps bouncing in front of the president and kept the Commander-in-Chief's Trophy.