WEST LAFAYETTE, Ind. (AP) – Danny Hope has been vindicated – for now. Few believed the Purdue coach when he preached that his team had potential, even after an embarrassing home loss to Notre Dame several weeks ago that had many fans questioning if he should remain the team’s coach.

The Boilermakers (4-3, 2-1 Big Ten) finally got the quality win they needed with a 21-14 victory over No. 23 Illinois on Saturday – Purdue’s first win over a ranked team since beating then-No. 7 Ohio State in 2009.

Now, Purdue – not Illinois – is near the top of the Leaders Division and talking about making a run at the Big Ten title.

“We’re still in control of our own destiny,” Hope said. “It would be really hard to go down and play in the championship game in Indianapolis with two losses already. It’s a milestone win in some ways, just to beat a ranked opponent at home.”

The Boilermakers had steadily improved in the weeks leading up to Saturday’s game. After the 38-10 loss to Notre Dame, the Boilermakers rallied for a 45-17 win over Minnesota the next week and a spirited effort in a 23-18 loss at Penn State.

Hope said in the days after the loss at Penn State that Purdue was on the verge of becoming a good football team. That process just accelerated.

“Everyone showed up, everyone played hard,” Hope said. “For three weeks in a row now we’ve taken the field with a lot of energy and a lot of enthusiasm.”

Illinois (6-2, 2-2) lost its second straight. Just two weeks ago, the Fighting Illini were undefeated and looked like solid contenders who might hang with Wisconsin and Penn State in the division. Then, the Illini stumbled through a mistake-filled 17-7 home loss to Ohio State and lost to Purdue after falling behind 21-0.

“We’re not doing something right to start off the game,” Illinois quarterback Nathan Scheelhaase said. “It is crucial for us to put points on the board, and obviously, we didn’t do that today. We’ve got to get it figured out because it is tough to try to come back every game.”

Raheem Mostert ran for a touchdown and tackled the punter on a play that led to another score for the Boilermakers.

Hope stuck with quarterback Caleb TerBush throughout instead of rotating him with Robert Marve as he had in previous weeks, and TerBush passed for 178 yards and two touchdowns. Hope said he discussed the situation with Marve, and Marve understood.

“It looked like Caleb was going to be red hot today,” Hope said. “It started off that way, anyway. We mentioned it to Rob, that we thought he was red hot and Robert said, ‘Well, he looks like he’s red hot to me, too.”‘

The Illini scored on a 16-yard run by Jason Ford with 8:12 remaining, and a 2-yard run by Scheelhaase cut Purdue’s lead to 21-14 with 54 seconds to play. But Purdue’s Justin Siller recovered the onside kick, and the Boilermakers ran out the clock.

“For us, it was too little, too late,” Illinois coach Ron Zook said. “We can’t fault practice, we can’t fault our preparation. This team wants to win, we have to play that way.”

Purdue did a much better job of containing Scheelhaase this year.

Last season, Scheelhaase passed for four touchdowns and ran for a game-high 118 yards to lead the Illini to a 44-10 win. This year, he passed for 217 yards, but ran for just 16 on 13 carries. He was sacked four times and was under constant pressure. Defensive tackle Kawann Short led Purdue with two sacks.

“We got a lot of push today up front,” Short said. “Last night, the line had a talk and we really came together as a unit. It is nice to see our hard work paying off.”

Illinois’ A.J. Jenkins, who led the nation in yards receiving, finished with eight catches for 92 yards. He never broke anything big, though, as Purdue cornerback Ricardo Allen got the best of their matchup.

“It’s not no secret,” Jenkins said. “When you study the opponent, you try to take away their best player. Obviously, other guys have to step up, which they have. It’s not going to be just me putting up numbers like that. Teams are going to try to take that away.”

Purdue’s offensive line protected TerBush from Illinois defensive end Whitney Mercilus, who led the nation with 10 sacks and was tied for the lead with five forced fumbles. Mercilus was held without a sack.

Illinois’ defense, ranked 12th nationally in yards allowed per game coming in, gave up 304 yards, including 229 in the first half.

Purdue squandered an early opportunity when Antavian Edison fumbled after the Boilermakers moved into Illinois territory.

But the Boilermakers got it going again on their next possession. TerBush rolled right to avoid the rush and found Siller downfield for a 32-yard gain. TerBush and Siller later connected again for a 6-yard touchdown that gave Purdue a 7-0 lead with 3:25 left in the first quarter.

Mostert scored early in the second quarter on a 21-yard run to give Purdue a 14-0 lead with 11:41 left.

Illinois went three-and-out on its next possession, and Mostert tackled Illini punter Justin DuVernois at the Illinois 14. TerBush found Jared Crank in the end zone for a 4-yard touchdown pass to put the Boilermakers up 21-0 with 7:48 left in the half.

Illinois tried to get Jenkins involved, and backup quarterback Reilly O’Toole fired deep to him late in the first half, but Allen intercepted inside the Purdue 10-yard line. Purdue held the Fighting Illini to 128 yards in the first half.

The Boilermakers still have a tough task ahead if they are to reach a bowl game. Their next four games are at Michigan, at Wisconsin and at home against Ohio State and Iowa.

They at least have momentum to take with them.

“We’ve got a really good team,” TerBush said. “We kind of have a handle on it now and we’re feeling pretty good.”