SOUTH BEND, Ind. — Riley Leonard threw two touchdown passes and ran for another, and No. 16 Notre Dame capitalized on No. 15 Louisville’s first three turnovers of the season to hold on for a 31-24 victory Saturday.

Notre Dame (4-1) relied on a last-minute defensive stand to hand the Cardinals their first loss of the season. Louisville (3-1) had a delay-of-game penalty on a fourth-and-1 at the Notre Dame 46. After the five-yard penalty, an incomplete pass ended the Louisville comeback attempt.

“I give the crowd the credit,” Louisville coach Jeff Brohm said. “It got loud. They couldn’t hear the call from me. That can’t happen. We have to have a better way in a situation with no timeouts and we have to get a first down. That’s on me.”

In addition to the three forced turnovers, Notre Dame held Louisville to 1-of-5 on fourth-down conversion attempts.

“I know the game gets close, but we have a lot of confidence in our defense,” Notre Dame coach Marcus Freeman said. “It’s why I’m so aggressive as a coach on fourth down. You got a lot of confidence in your defense.”

Leonard was 17 for 23 for 163 yards. Louisville’s Tyler Shough was 24 for 41 for 264 yards and three touchdowns, but was intercepted once. Shough had thrown 88 passes without an interception this season before getting picked off on a deflected pass.

Louisville committed its three turnovers in the first half and trailed 24-14 at halftime.

“It wasn’t a clean day for us,” Brohm said. “Unfortunately, that’s not good enough to win, having to go on the road, especially at Notre Dame. We had some critical mistakes in key situations.”

After a 56-yard field goal by Brock Travelstead with 11:25 left in the game pulled Louisville within 24-17, Notre Dame surged back to regain a two-touchdown lead.

Leonard’s screen pass to Jeremiyah Love turned into a 32-yard scoring play, and the Fighting Irish were in front 31-17 lead with 9:16 remaining.

Louisville fought back with a 24-yard touchdown pass from Shough to Ja’Corey Brooks with 5:17 left to trim the Notre Dame lead to 31-24.

Louisville grabbed the early advantage in a rainy start at Notre Dame Stadium. T.J. Capers forced a fumble by Notre Dame returner Devyn Ford on the opening kickoff. Tamarion McDonald pounced on the ball at the Fighting Irish 24.

The Cardinals only needed three plays to cash in. Shough threw a 10-yard strike to Isaac Brown for the touchdown and Travelstead’s kick gave Louisville a 7-0 lead.

Notre Dame then went ahead 21-7 in a span of 5 minutes, 42 seconds.

“We played lights out of the first half, especially offensively,” Freeman said.

Notre Dame answered Louisville’s opening touchdown on its next possession, driving 75 yards on 12 plays. Love bulled his way into the end zone from the 6.

What looked like a huge gain for Louisville turned into the Cardinals’ first turnover of the season. Shough bolted out of the backfield on a misdirection play and raced 43 yards, but Notre Dame’s Leonard Moore caught up to Shough and forced a fumble. Jaiden Ausberry recovered for Notre Dame at its 47. Leonard put the Irish ahead with a 34-yard touchdown pass to Jaden Greathouse.

Leonard raced up the middle for the touchdown after another turnover and the Fighting Irish were up 21-7.

“I thought we did a great job on offense of emphasizing having the urgency to start really fast,” Leonard said. “Even though (the early Louisville touchdown) happened, we had all the confidence in the world that we were going to start fast on offense because we did it every single day in practice.”

Notre Dame’s second fumble, on a run by Jadarian Price, led to the Cardinals closing to 21-14 with 12:28 left in the second quarter when Shough hit Brooks for a 5-yard TD pass.

Louisville’s third turnover came when Notre Dame’s Xavier Watts, who led the nation last season with seven interceptions, picked off a pass and returned it 34 yards to the Louisville 36.

Watts said that the victory was particularly meaningful for the Fighting Irish. Notre Dame avenged a 33-20 loss at Louisville last season that knocked the Fighting Irish out of playoff contention.

“This was a big win for us, especially with last year’s loss,” Watts said. “We came into this game ready to go.”

Notre Dame hopes its upcoming bye will allow defensive lineman Boubacar Traore, and defensive backs Benjamin Morrison and Christian Gray and Jordan Faison to heal after all missed time during the game with injuries. Leonard missed one play after a hit to the shoulder.

Notre Dame has a bye week, and then the Fighting Irish host Stanford on Oct. 12

Lions pull away from Illini in second half: Nick Singleton ran for 102 yards and a touchdown, Kaytron Allen added 94 yards and a score and No. 9 Penn State pulled away in the second half to beat No. 19 Illinois 21-7 on Saturday night.

Penn State (4-0, 1-0 Big Ten) took a 14-7 lead on Singleton’s 4-yard touchdown run on its opening second-half possession. The Nittany Lions then went into lockdown mode.

Penn State forced four punts, recovered a fumble and A.J. Harris intercepted Luke Altmyer’s pass late in the fourth quarter.

After scoring easily on their opening drive, the Illini (4-1, 1-1) managed just 25 rushing yards the rest of the way. They were tackled 13 times behind the line of scrimmage and allowed seven sacks.

Both teams scored on their first possessions before sputtering for the rest of the first half.

The Illini calmly marched 75 yards through the lingering smoke of pregame fireworks, converting a pair of third downs and getting help from a late hit to set up a Altmyer’s 4-yard touchdown pass to Carson Goda.

The Nittany Lions needed just eight plays over 4:02 to pull even. After big runs from quarterback Drew Allar and Singleton, tight end Tyler Warren leapt over the line of scrimmage from 3 yards out.

Penn State drove into Illinois’ territory again late in the second quarter, but stalled out at the 23 and Sander Sahaydak missed a 40-yard field goal.

Illinois botched its best shot to retake the lead late moments later.

Having directed his offense down to Penn State’s 2, Altmyer had to retreat as the first-down snap sailed over his head. He then lost 3 yards on a keeper before he was sacked and called for intentional grounding on third down.