EVANSTON, Ill. -- Ian Book threw for threw two touchdown passes and ran 23 yards for a score in the closing minutes to lead No. 3 Notre Dame to a 31-21 victory over Northwestern on Saturday night.

The Fighting Irish (9-0, No. 4 CFP) remained in line for a playoff spot and continued to build on their best start since the 2012 team went undefeated before losing to Alabama in the BCS championship game. The Wildcats (5-4) had won four in a row to grab the Big Ten West lead and they stayed in this one when it looked like Notre Dame was ready to pull away.

Book threw a 20-yard touchdown pass to a leaping Miles Boykin in the corner of the end zone and a 47-yarder to Michael Young in the third to give the Irish a 21-7 lead. He sealed it in the closing minutes when he turned up the left side for that 23-yard run.

But things sure got close prior to that run.

It was 24-7 early in the fourth when Northwestern's Clayton Thorson threw a 27-yard touchdown to Riley Lees. Cameron Ruiz then blocked a punt by Tyler Newsome, giving the Wildcats possession on the Notre Dame 17.

That led to a 1-yard sneak by Thorson, cutting it to 24-21 with 7:05 left.

Book improved to 6-0 as the starter, going 22 of 34 for 343 yards. Chase Claypool had eight receptions for 130 yards, and Dexter Williams ran for a 1-yard touchdown in the first quarter.

Northwestern is 0-3 in nonconference games. The Wildcats haven't beaten a top-five opponent since 1959, when Ara Parseghian was their coach.

Thorson was 16 of 29 for 141 yards and a touchdown. He also ran for two TDs. Isaiah Bowser added 93 yards rushing on 23 attempts after back-to-back 100-yard games.

Both teams missed some big scoring opportunities in the first half. The Irish were also hurt by penalties.

Northwestern blew a big chance after linebacker Blake Gallagher recovered a fumble by Book on the game's opening possession. The Wildcats took over at the Notre Dame 35, only to come away empty-handed when Charlie Kuhbander missed a 39-yard field goal wide right.

The Irish then went 79 yards, with Williams plowing in from the 1 to give them a 7-0 lead and delight the fans in blue and gold. But they also missed a big chance late in the quarter. Two penalties helped drive them back from the Northwestern 5 to the 27 before Justin Yoon's 44-yard field goal attempt sailed wide left.

Northwestern tied it midway through the second quarter when Thorson scored from the 1. Bennett Skowronek kept the drive going with a one-handed grab on fourth-and-5 at the Notre Dame 21, and the Irish's Jalen Elliott got flagged for interference breaking up a pass intended for Cameron Green in the end zone.

THE TAKEAWAY

Notre Dame: The Irish remained in the playoff hunt even though this wasn't an easy game.

Northwestern: The Wildcats hung with one of the nation's best teams, only to come up short. The loss doesn't impact the division standings.

UP NEXT

Notre Dame: Hosts Florida State on Nov. 10.

Northwestern: Visits Iowa on Nov. 10.