Charles LeClaire-USA TODAY Sports

Riley Leonard's second touchdown pass of the game to Sahmir Hagans came with 2:04 to play and lifted Duke past visiting Wake Forest 34-31 on Saturday at Durham, N.C.

Leonard threw for four touchdowns to complete a splendid regular season under first-year coach Mike Elko. The Blue Devils (8-4, 5-3) were winless in ACC play last season. The winning points came on a 20-yard pass play.

Sam Hartman threw three touchdown passes to tie an Atlantic Coast Conference record for Wake Forest, but he was picked off on his final pass. Hartman completed 26 of 42 throws for 347 yards. Justice Ellison scored on a run for Wake Forest (7-5, 3-5).

Leonard was 29-for-41 for 391 yards. Duke had a 14-play drive go for naught in the fourth quarter when Leonard's pass was intercepted in the end zone by Jermal Martin Jr. with 5:05 remaining. The Blue Devils had one more chance and made it count, needing two plays to cover 65 yards.

Duke snapped a three-game skid in the series with Wake Forest. Elko is a former defensive coordinator for the Demon Deacons.

Leonard's 30-yard pass play to Jordan Moore helped Duke to a 27-17 lead.

Hartman struck back, first throwing 17 yards to Taylor Morin before his 6-yard delivery to A.T. Perry with 12:31 remaining put the Demon Deacons in the lead for the first time since the opening minute of the second quarter.

That also marked Hartman's 107th career touchdown pass, tying him with former Clemson quarterback Tahj Boyd for the all-time ACC record.

Duke's Todd Pelino had field goals from 42 and 32 in the first half, which ended with the Blue Devils up 20-17.

Leonard hit Hagans for 30 yards and Jaylen Calhoun for 46 in a 5 ½-minute stretch early in the second quarter as Duke went up 17-7.

Hartman's 8-yard hookup with Donavon Greene closed the gap and Matthew Dennis' 32-yard field goal with 1:50 to go in the half tied the score.

Calhoun caught 10 passes for 144 yards.

More must-reads:

TODAY'S BEST
Unlikely hero helps Rangers steal Game 3 over Panthers
Angels slugger suffers what might be baseball's most bizarre injury of 2024 season
Watch: Unlikely Rangers playoff hero nets two goals vs. Panthers
Celtics put Kristaps Porzingis' return from injury on hold
Watch: Panthers' Sam Reinhart nets two goals in first period vs. Rangers
Watch: Big crash ensues on Lap 1 of 2024 Indianapolis 500
Red Sox release well-traveled right-hander
Braves slugger, four-time All-Star leaves game due to knee soreness
Anthony Edwards makes declaration ahead of Game 3 against Mavericks
Watch: Matt Vierling's walk-off HR caps wild game in Detroit
Report: Star Japanese pitcher could move to MLB next year
Royals return Rule 5 pick to Yankees
Sixers viewed as a 'serious danger' to snatch core Nuggets role player
NFL reporter reveals why CeeDee Lamb isn't rushing to sign new contract
Diamondbacks designate struggling right-hander for assignment
Report: 76ers believe this eight-time All-Star would be 'ideal fit'
Pelicans expected to promote from within for GM role
Watch: Massive wreck on first lap delays Monaco Grand Prix
Grayson Murray's parents release heartbreaking statement on cause of death
Rangers designate right-hander for assignment