HARRISONBURG, Va. (AP) _ Quarterback Joe Elrod came off the bench to engineer a 20-point fourth-quarter rally Saturday, running for two touchdowns in the game's final minutes, as Richmond beat James Madison 34-33.

James Madison (6-3, 4-2 Yankee Conference), which has come from behind to win four games on the final play this season, nearly made it five. Time expired as Bryan Leibrand pulled down Macey Brooks on the Richmond 1-yard line.

After Paul Harris intercepted a Jason Gabrels pass and returned it 44 yards for a touchdown with 8:34 remaining, the James Madison lead was 33-14.

Elrod replaced Gabrels for the Spiders (6-1-1, 4-1) and engineered a 13-play, 65-yard scoring drive, capped by a 16-yard quarterback draw. Minoso Rodgers try for the 2-point conversion was stopped, leaving the score at 33-20.

The Spiders recovered the subsequent on-sides kick and drove to the James Madison 9 before Elrod's fumble was recovered by the Dukes Doug Bigelow. On the Dukes first play, Dee Townes fumbled after being hit by Leibrand, who scooped up the ball and ran 9 yards for a score with 2:48 left. Greyson Masters kicked the extra point to cut the lead to 33-27.

On the next series, James Madison again fumbled away the ball. Damon Roberts gained 15 yards to the Dukes 35 where he dropped the ball. Art Blanchard recovered it, and the Spiders were back in business.

Four plays later, Elrod scored from 1 yard out with 59 seconds left, and Masters hit the extra-point for the winning score.

Mike Cawley, who had engineered the Dukes come-from-behind victories, used most of those 59 seconds to drive to the Spiders 43 before being sacked for a 9-yard loss. Faced with a fourth-and-19, Cawley hit Macey Brooks on a 51-yard pass that ended on the 1-yard line as time expired.

Cawley was 16-of-41 for 213 yards, including a 11-yard scoring pass to Gerald Smith. He also ran for a score.

Rodgers led the Spiders with 141 yards and one TD on 24 carries.