Garrett Turner rushed for a 1-yard touchdown on fourth down with 10:12 remaining to help Richmond beat Duke 23-21 on Saturday night.
The Spiders, members of the Football Championship Subdivision, beat the Blue Devils of the ACC for the third time in the last six seasons.
''Bottom line is we were erratic,'' Duke coach David Cutcliffe said. ''We're not good enough to play erratic and win.''
The Blue Devils outgained the Spiders 379-288 in total yards, but they made too many mistakes.
While the Spiders had one turnover and got points on four of their five trips inside the red zone, Duke had two turnovers and scored on just two of four trips inside Richmond's 20.
Will Snyderwine missed a 28-yard field-goal attempt that would have given Duke the lead with 1:43 remaining. And, after forcing a punt on Richmond's last possession, his 60-yard kick on the final play of the game also came up short.
''I just pushed it, completely my fault,'' Snyderwine said of the first miss. ''I just didn't quite do my job right there. It's tough.''
Richmond's Remington Hinshaw missed his extra-point try wide right after Turner's touchdown, leaving the door open for Duke's late game-winning attempts.
The Spiders also overcame other adversity. Wayne Lineburg was in his first game as interim coach after replacing Latrell Scott, who resigned Aug. 23 after being charged with driving under the influence.
''We were able to rally around each other today,'' Richmond linebacker Darius McMillan said.
The lead changed on four consecutive possessions in the second half, but the Spiders held on for their third consecutive win in the series. Richmond defeated Duke 13-0 in 2006 and triumphed 24-16 over Duke in 2009.
Aaron Corp passed for 193 yards, a touchdown and an interception for Richmond. Trey Gray added eight receptions for a career-high 129 yards.
Gray made the big play on Richmond's game-winning touchdown drive. He caught a short pass on third and 7 and turned it into a 33-yard gain, setting up the Spiders with first and goal at the Duke 7.
Kendall Gaskins moved the ball just inches away from the goal line with three runs, and Turner plowed into the end zone.
Desmond Scott rushed for 80 yards and a touchdown for the Blue Devils before leaving the game late in the third quarter with an undisclosed leg injury. He did not return and is scheduled for further evaluation Sunday.
Lineburg, who had been Richmond's offensive coordinator, maintained his duties on that side of the ball. His offense capitalized on its opportunities, something Duke failed to do throughout the game.
''I can't tell you what happened,'' Duke wide receiver Conner Vernon said. ''I just know we didn't execute and play the game we know how to play.''
The Blue Devils missed a scoring chance at the end of the first half when time ran out before they could try a field goal.
With no timeouts remaining, Duke elected to run a play from the Richmond 19 with 10 seconds left. Braxton caught a slant pass and was tackled before he got the first down, keeping the clock moving.
''End of the first half, I got greedy,'' Duke coach David Cutcliffe said. ''Poor judgment on my part.''
Two turnovers by Duke deep in its own end allowed Richmond to take a 10-7 lead at halftime.
Corp threw a 6-yard touchdown pass to Stephen Barnette on the first play of the second quarter, opening the scoring, after a lost fumble by Duke quarterback Sean Renfree.
Scott tied the score 7-7 with a 29-yard touchdown run less than two minutes later, but Brandon Braxton lost a fumble on Duke's next possession. The Spiders capitalized with a 29-yard field goal by Hinshaw for the three-point halftime advantage.
The Blue Devils warmed up in their traditional blue jerseys and white pants, but they returned from the locker room with a new look. Duke's players donned black jerseys and black pants, running back onto the field as ''Back in Black'' by AC/DC boomed out of the speakers just before kickoff.
Whatever boost the Blue Devils received from their new look quickly wore off. Renfree tripped while dropping back for his first pass of the game, throwing the ball out of bounds and drawing a flag for intentional grounding. Duke managed 35 total yards on its first four possessions.