A 3-pointer by Wells with 48 seconds remaining put the Dukes (11-15, 4-11 Colonial Athletic Association) ahead 72-69 and four free throws by Pierre Curtis in the final 18 seconds helped them end a four-game losing streak.
Curtis was 8-for-8 on free throws with 10 points and six assists.
James Madison opened the second half with a 19-2 run to lead 52-43 with 15:01 left. The Rams (17-7, 9-6) whittled the margin and took their only lead the rest of the way, 63-62, with 3:52 left on a basket by Larry Sanders, who had 15 points and 14 rebounds.
Bowles had 17 of his points for the Dukes in the first half.