BLOOMINGTON, Ind. (AP) -- For 30 minutes against Indiana, Michigan State's defense looked like anything but one of the nation's best units.
The Spartans regained their normal footing in the second half, shutting out Indiana in the final two quarters of a 31-27 victory on Saturday.
Michigan State, which had allowed averages of 12.8 points and 263.4 yards in its first five games, held Indiana to 37 yards and two first downs in the second half after allowing 183 yards in the first quarter against Indiana's no-huddle offense.
"They were just fast," Michigan State linebacker Max Bullough said. "A fast-paced offense, that's tough for a defense, no matter what type of defense it is. I think we struggled with that a little bit. Once we were able to kind of feel the pace of the game, I thought that we played better and did better after that."
Michigan State's defense gave the offense time to get on track. Andrew Maxwell passed for 290 yards and two touchdowns, Aaron Burbridge caught eight passes for 134 yards and Le'Veon Bell ran for 121 yards and two touchdowns on 37 carries for the Spartans (4-2, 1-1 Big Ten).
Michigan State trailed 27-17 heading into the fourth quarter before rallying.
"Not how you draw it up," Maxwell said. "You don't want to be down 10 going into the fourth quarter, but the character and the resilience of our team -- we just kept battling, kept battling, kept chipping away and we came out on top."
Indiana had success moving the ball at times. Cameron Coffman passed for 282 yards and three touchdowns and Shane Wynn had 12 catches for 70 yards for the Hoosiers (2-3, 0-2). Indiana had a chance to give second-year coach Kevin Wilson his first conference win, but the Hoosiers went three-and-out on critical back-to-back possessions in the fourth quarter.
"Tough loss," Wilson said. "Played a half real hard. Second half (we) just got outplayed. Credit to Michigan State and coach (Mark) Dantonio and really should credit their kids because there was really no magic changes."
Indiana was unable to rely on its running game at all. The Hoosiers finished with 35 yards on 19 carries. The Hoosiers, despite trying to hold a lead, passed on all seven of their plays in the fourth quarter and had the ball for a total of 1:40.
Wilson started Coffman over Nate Sudfeld at quarterback, and the Hoosiers rolled right down the field against one of the nation's best defenses. Coffman fired a 19-yard touchdown pass to Stephen Houston 77 seconds into the game.
Two possessions later, Mitch Ewald's 32-yard field goal made it 10-0, Hoosiers.
After Michigan State was called for a roughing-the-punter penalty, Coffman took advantage with a 21-yard touchdown pass to Ted Bolser with 38 seconds left in the first quarter.
Michigan State finally got it going in the second quarter. Bell scored from 2 yards out to cut Indiana's lead to 17-7.
Maxwell followed with a 15-yard touchdown pass to running back Larry Caper to trim Indiana's lead to 17-14 with 6:26 left in the first half.
Indiana came right back when Coffman found Wynn for a 17-yard touchdown pass. Indiana recovered an onside kick, and a 19-yard field goal by Ewald gave Indiana a 27-14 lead at halftime. Coffman completed 23 of 30 passes for 256 yards in the first half.
Michigan State got the ball first in the second half, and a 46-yard field goal by Dan Conroy cut Indiana's lead to 27-17.
Michigan State went for it on fourth down at the Indiana 2 and Bell got a yard and the first down on a play that was reviewed. Two plays later, Bell scored from the 1, cutting Indiana's lead to 27-24 with 7:49 to play.
Coffman missed on three straight passes, and Michigan State got the ball back 20 seconds after the previous score. On the third play of the possession, Maxwell connected with Bennie Fowler for a 36-yard touchdown pass to give the Spartans a 31-27 lead.
Indiana went three-and-out again and punted. Michigan State's Nick Hill fumbled the fair catch but fell on it, and Indiana got a personal foul penalty, giving the Spartans the ball at the 50. Michigan State ran out the clock, clinching the game on a fourth-and-1 conversion by Bell on the Indiana 9-yard line in the final minute.
Coffman took the change in offensive fortunes in the second half personally.
"You saw how good we can be when we're playing well, but we're not into moral victories. We fully expected to beat that team and we didn't. It's my fault on the offensive side."
Maxwell said the way the Spartans won will be important in the long run.
"You never want to define a season by one game, but we're going to be in situations like this in the future," he said. "It's not easy in this conference, it's never been easy. There's going to be times when you have to battle back from adversity."