TALLAHASSEE, Fla. – Dalvin Cook and Florida State left Brad Kaaya and Miami behind again.

Kaaya threw for 404 yards and three touchdowns, including a 29-yard pass to Stacy Coley with 10:02 remaining that gave Miami a 24-23 lead. But Cook countered with his third touchdown, a 23-yarder around right end, to give the 12th-ranked Seminoles a 29-24 victory Saturday night.

“Despite going down early they stayed together and we had opportunities to win,” Miami coach Al Golden said. “We just needed to make one more play somewhere along the line.”

Florida State also rallied to beat Miami last year.

The Hurricanes (3-2, 0-1 Atlantic Coast Conference) nearly made that play on Florida State’s ensuing drive. They forced the Seminoles (5-0, 2-0 ACC) into third-and-8 on the Florida State 18, but Everett Golson completed a 20-yard pass to Jesus Wilson to keep the drive alive. Cook took over with three carries for 47 yards, including the go-ahead touchdown.

Miami had two drives after that, but saw them stall. It drove to its own 42 with under a minute left, and Kaaya’s pass intended for Herb Waters was incomplete.

Kaaya completed 29 of 49 passes. He had the fifth 300-yard game of his career and his second against the Seminoles.

Coley had seven receptions for 139 yards and Rashawn Scott added six catches for 108 yards. The Hurricanes took advantage of a Florida State’s short-handed secondary, especially after Jalen Marshall was ejected in the first quarter for targeting.

Cook, a Miami native, came up big against the Hurricanes again with 222 yards on 22 carries and accounted for all three Florida State touchdowns. It is the most yards as Seminoles’ back has had against the Hurricanes, surpassing Greg Jones’ 189 in 2002.

Cook’s status was in doubt for most of the week due to a strained hamstring he suffered the week before at Wake Forest. He returned to practice on Wednesday and said he began to feel like himself during pregame warmups.

“While I was warming up and felt great I knew it was a go,” Cook said. “It was a great feeling and something you can’t describe going out there and scoring the winning touchdown and watching the defense stop them.”

Last year, Cook scored the go-ahead touchdown with 3:05 remaining. Before Cook’s game, the previous high by a Florida State back against Miami was 189 yards by Greg Jones in 2002.

“He’s a great back and we missed too many tackles on him and he got free in the open field,” Golden said. “The whole game plan was obviously to contain Cook. We let him out too many times and he made us pay on the second level.”

The Seminoles have won six in a row against the Hurricanes, their longest winning streak in the series since winning seven straight from 1963-72.

Trailing 17-3, Miami got back into it on Kaaya’s 58-yard touchdown pass to Scott, who was able to get separation from cornerback Jalen Ramsey while Lamarcus Brutus tried to go for the interception and missed.

After that, Miami was able to counter Roberto Aguayo’s field goals with touchdowns. Joe Yearby’s 1-yard reception brought them to 20-17 with 5:26 remaining in the third. After Aguayo’s third field goal, Coley’s touchdown gave the Hurricanes a short-lived lead.

Golson completed 25 of 33 passes for 291 yards and a touchdown. Kermit Whitfield had nine receptions for 95 yards.

Cook opened the scoring on his first carry with a 72-yard run. It was the second straight week that Cook scored a touchdown on his first carry and was his third touchdown run this season of 70-plus yards. He also took a screen pass by Golson 36 yards to make it 14-3 late in the first quarter.

AP-WF-10-11-15 0549GMT