MIAMI GARDENS, Fla. (AP) — Cam Ward found Isaiah Horton with a 1-yard touchdown pass with 1:57 left for what became the winning score, and No. 7 Miami rallied to beat Virginia Tech 38-34 in the Atlantic Coast Conference opener for both teams on Friday night.

The ending was controversial: Officials deemed that Da’Quan Felton caught a 30-yard touchdown pass from Kyron Drones amid a crowd of players from both teams as time expired, which would have given Virginia Tech the win. The call was overturned after a long review. Ward threw for 343 yards and four touchdowns, extending his national lead to 18 scoring throws so far this season.

The Hurricanes (5-0, 1-0) trailed by double digits on three separate occasions, the last of those when the Hokies went up 34-24 with 12:05 left. But Miami found a way at the end — barely — to win its ACC opener for the first time in four years and remain unbeaten. Drones threw two touchdown passes, while Bhayshul Tuten rushed for 141 yards and another score for Virginia Tech (2-3, 0-1).

John Love had field goals of 52 and 56 yards for Virginia Tech. The Hokies turned three Miami turnovers into 14 points and seemed poised to knock off a team ranked 7th or higher in the AP Top 25 for the first time since Oct. 2, 2004 — a 19-13 win over then-No.

6 West Virginia. But needing a touchdown on the final drive to pull the upset off, Virginia Tech got to the Miami 30 and nearly got the winning score. On the go-ahead drive, Miami escaped disaster —.