STATE COLLEGE, Pa. (AP) Each Michigan State player brought a poker chip to Happy Valley and coach Mark Dantonio encouraged the Spartans to push them all to the center of the table Saturday.

As the evening wore on against No. 8 Penn State, it was clear the Spartans were all-in.

They converted a fake punt early, tried a fake field goal instead of kick for the tying points late in the fourth quarter and opted to throw to the end zone instead of run it to preserve another shot at an equalizing kick. That go-for-broke mentality paid off in Michigan State's 21-17 win.

Brian Lewerke threw a 25-yard touchdown pass to Felton Davis with 19 seconds left to lift the Spartans over the Nittany Lions, making it two consecutive seasons Michigan State used a late score to hand Penn State a second straight loss.

It was a needed win for the Spartans after a week filled with players publicly demanding more from each other following a tough loss at home to Northwestern.

''We didn't want to play to try and tie it,'' Dantonio said ''And quite honestly, I felt like Penn State was too explosive with (QB Trace) McSorley creating too many plays, that eventually they would find their way back down the field.''

But despite having a week off to prepare for the Spartans, the Nittany Lions (5-2, 1-2) couldn't get it done and were outplayed again in the final quarter, two weeks after they let a fourth-quarter lead get away against Ohio State.

Penn State lost to Ohio State and Michigan State in consecutive weeks last season, too, with the Spartans kicking a last-second field goal.

''We had a chance to put them away several times on offense, on defense and on special teams and we didn't do it,'' Penn State coach James Franklin said. ''We let them stay in the game.''

Davis stayed in despite hurting his hip on Michigan State's penultimate drive and finished with eight catches for 100 yards. He knew he would get his shot late.

''In the huddle, I told Brian to just throw it up and give me a chance and he did,'' Davis said.

Miles Sanders ran for 162 yards and a touchdown for the Nittany Lions and McSorley completed 19 of 32 passes for 192 yards with a touchdown to become the program's all-time passing yardage leader.

It looked like the Spartans would regret an attempt at late trickery.

After a 10-play drive deep into Penn State territory, Michigan State lined up for what could've been a tying 40-yard field goal with 5:19 left, but faked the kick. The ploy failed when safety Garrett Taylor swatted Lewerke's pass away from defensive tackle Raequan Williams.

But Penn State ran just seven plays on its next two possessions and gave Lewerke the ball back with 1:19 to play. He put together an eight-play, 76-yard drive that ended with Davis turning and catching a back-shoulder throw and juking past corner Amani Oruwariye for the winning score.

THE TAKEAWAY

Michigan State: The banged up Spartans, still without running back LJ Scott and wideout Cody White, were able to control time of possession and keep Penn State's offense well below its scoring average. That possession time advantage paid off as Penn State's defense looked gassed again in the fourth quarter.

Penn State: Coach James Franklin said his team needed to evolve from a great team to an elite one after its one-point loss to Ohio State. The Nittany Lions still have plenty of work to do to get there. They looked sluggish on offense late, committed six penalties for 41 yards, turned the ball over twice and had no answer for Lewerke's arm in the fourth quarter.

SO CLOSE

The Nittany Lions had two chances to seal the game as the Spartans mounted their final drive. Both Taylor and Oruwariye stepped in front of Lewerke passes but both times the ball eluded their grasp.

NELSON STEPS UP

Dantonio said he planned on redshirting freshman wideout Laress Nelson, but admitted that will be hard to do after his performance. Nelson caught five passes for 60 yards including two for 32 yards on the final drive.

UP NEXT

Michigan State: The Spartans host No. 12 Michigan next week.

Penn State: The Nittany Lions go to Indiana next week.

---

More AP college football: https://apnews.com/tag/Collegefootball and https://twitter.com/AP-Top25

Copyright 2018 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.