OXFORD, Ohio (AP)Aveon Smith threw a late 34-yard touchdown pass to Miles Marshall and Miami (Ohio) beat Ball State 18-17 on Tuesday night in a Red Bird Rivalry game with bowl eligibility on the line.

Both teams entered the game with 5-6 records, needing a win to qualify for a postseason bowl game.

Smith scored on an 18-yard run with 6:12 left to play, but Miami trailed 17-12 after he threw incomplete on the two-point conversion.

Cameron Steele carried eight straight times for Ball State, gaining 22 yards before the RedHawks stuffed him on fourth-and-1 and Miami took over at the Cardinals’ 47-yard line with 3:05 remaining.

Smith picked up a first down with a third-down pass to Jalen Walker and then hit Marshall on third-and-10 for the go-ahead score with 1:42 to go. Smith threw incomplete on the two-point try and Miami led 18-17.

Brian Ogwu picked off John Paddock in the final minute to preserve the RedHawks’ win.

Steele scored on a 48-yard run, ending a nine-play, 88-yard drive, to give Ball State a 7-0 lead after one quarter. Steele raced 23 yards for another touchdown midway through the second quarter to put the Cardinals up 14-0. Graham NIcholson kicked a 30-yard field with 1:41 left in the first half to get the RedHawks on the scoreboard.

The Cardinals led 17-6 heading to the final quarter after Ben VonGunten and Nicholson traded field goals.

Steele ran for 180 yards on 26 carries for the Cardinals. He finished the season with 1,556 yards and 14 touchdowns. The sophomore topped 100 yards rushing in all but three games.

Miami (6-6, 4-4 Mid-American Conference) leads the series 22-13-1 and has won six of the last seven match-ups.

Ball State (5-7, 3-5) was trying to become bowl eligible in three straight seasons for the first time.

More AP college football: https://apnews.com/hub/college-football and https://twitter.com/AP-Top25. Sign up for the AP’s college football newsletter: https://apnews.com/cfbtop25