AMHERST, Mass. — Caleb Heavner and Scoop Smith each ran for touchdowns and Miami (Ohio) held on to beat UMass 20-19 in a contest that went down to the last offensive play of the game on Saturday.

The Redhawks (3-3, 1-1 Mid-American Conference) led 20-13 with 2:21 left to play. UMass (4-2, 1-2) took the possession and went on a nine-play, 70-yard drive that ended when third-string quarterback Logan Inagawa threw a 21-yard touchdown to Max Dowling with a second left in regulation.

Opting to play for the win, the Minutemen’s Reece Adkins was stopped by Miami’s Malcolm McClain on the 2-point conversion attempt.

“All week as a staff — this is true — we said it was a race to 21,” UMass head coach Joe Harasymiak said. “That would have been 21.”

Heavener’s 7-yard touchdown run with 1:11 left in the first quarter ended a 7-all tie and the Redhawks led the rest of the way.

Get Sports Alerts

The latest sports news and Globe’s most interesting reporting and commentary right to your inbox.

Heavener struggled from pocket completing just 6 of 20 passes for 95 yards but ran for 54 yards on 11 carries and the touchdown.

Aedan McCarty threw for 171 yards for UMass before he suffered an injury and was replaced by Inagawa, who went 6 for 6 passing for 83 yards and the last-second touchdown to Dowling.

The Minutemen were playing without top quarterback Pop Watson, who has an ankle injury and was seen on the sideline with a walking boot. Wide receiver Joseph Griffin Jr., who ranks third on the team with 134 receiving yards, was out with an injury as well.

“Pop’s going to be hopefully evaluated next week,” Harasymiak said. “He kind of tweaked an injury against Sac State … We have to get him healthy. I just don’t think he was in a position to play. The young man did literally everything possible to try and go.”

The RedHawks have a 6-1 advantage in the 14-year-old series.

UMass will look to get back to winning when they head to Buffalo to face the Bulls next Saturday.