With the game on the line, Illinois didn't follow the scouting report on Penn State's Tim Frazier.
Off a timeout with 16 seconds left and the score tied, Frazier drove near the top of the key with a defender hounding his every step.
One screen and a move right later, Frazier broke free for a floater in the lane with 8 seconds left that helped the Nittany Lions upset the 22nd-ranked Illini 54-52 on Thursday night.
"The one thing we wanted to do was force him left. He's much better right," Illini coach Bruce Weber said. "Give him credit, he used the ball screen."
Illinois' 7-foot-1 center Myers Leonard had fouled out, so Penn State coach Patrick Chambers decided to give the ball to Frazier and have him attack the basket. Jon Graham's pick helped free him up.
Frazier finished with 12 points and nine assists for the Nittany Lions (10-10, 2-5 Big Ten), who ended a three-game losing skid. Jermaine Marshall blocked Sam Maniscalco's layup at the buzzer to seal the win.
The Illini (15-4, 4-2) lost for the first time since re-entering the AP Top 25 this week. They had a short stay atop the Big Ten as the lone one-loss team in conference play.
Brandon Paul had 20 points, while Leonard added 15 for Illinois, which played for the first time since upsetting then-No. 5 Ohio State on Jan. 10.
"We didn't play well. I didn't coach well," Weber said. "I didn't prepare them well enough ... We weren't very sharp."
The Illini chipped away at a nine-point deficit several times in the second half thanks in part to better ball movement. Paul's 3 from the left wing with 39 seconds left tied the game at 52.
But Illinois couldn't break through after shooting 33 percent in the first half and going scoreless for an 8-minute stretch spanning both periods. Illinois shot 34 percent (17 of 49) for the game.
Paul was supposed to get the ball on the game's final play, but Maniscalco ended up taking the shot after some confusion.
"It was kind of scrambled in the huddle for us to figure it out. There were a lot of communication problems but it didn't work out," Paul said. "I wish it went the other way. I'd rather just step off, then make a play but it didn't happen that way."
Illinois couldn't exploit that Frazier, Penn State's point guard, picked up his fourth foul with 5:12 left and the Illini down a point.
Cammeron Woodyard finished with 17 points for Penn State, while Marshall finished with seven points and five rebounds.
But the highlight of Marshall's night was his lunging tip to deflect Maniscalco's shot at the end of the game.
Illinois' poor start from the field warmed Nittany Lions fans hoping to witness another tight game with the Illini on a chilly, snowy night in Happy Valley. Five of the last eight games in the series have been decided by two points or less. Penn State won 57-55 at home last season, over then-No. 16 Illinois.
They pulled out another close one, this time to get Chambers his first victory over a ranked opponent in Happy Valley.
Wearing an alternate, all gray uniform for the first time in program history, the Nittany Lions scored another key win over Illinois to rock the Jordan Center. Paul scored nine points in the first half, when Illinois shot just 8 of 24 from the field to trail 25-23.