MIAMI GARDENS, FLA. — Virginia's first appearance in the Orange Bowl featured the 24th-ranked Cavaliers pushing No. 9 Florida throughout, underscoring the promise of an ascending program, before late miscues spelled doom in a 36-28 loss to the Gators on Monday night.

Virginia (9-5) ended its season with two straight losses, narrowly failing to become just the second team in school history to collect 10 wins. The Cavaliers were coming off a 62-17 loss to No. 3 Clemson in the ACC championship game Dec. 7 in Charlotte.

In the finale to a record-setting career, Virginia quarterback Bryce Perkins completed 28 of 40 passes for 323 yards and four touchdowns at Hard Rock Stadium, but it was not enough to deliver the Cavaliers victories in consecutive bowl games for the first time since 2002 and 2003.

Perkins became the Cavaliers' all-time leader in total offense (7,910 yards) with 347 yards combined passing and rushing in Virginia's first berth in consecutive bowl games since 2004 and '05. The senior transfer from Arizona Western earlier had set the school single-season record for total offense.

"The spirit and the bond of this team is unmatched," Perkins said. "You can see on the field just how hard we fight for each other. I'm not into moral victories because we lost the game, but I'm proud of these guys, proud of how we worked, and I'm proud of the culture we set and the standard."

Trailing 33-21 early in the fourth quarter, Virginia marched to the Florida 13. But after a four-yard loss on a Wayne Taulapapa run, Perkins had his pass intercepted at the 3 when Florida cornerback Kaiir Elam kept his feet in bounds while clutching the ball with 5:11 to play.

The Gators moved out of the shadow of their end zone on the next snap with a 53-yard pass from quarterback Kyle Trask to wide receiver Van Jefferson, and they extended the possession long enough to force Virginia to use all three of its timeouts before kicker Evan McPherson made a 42-yard field goal to expand the lead.

Perkins's final touchdown pass, a two-yard throw to Hasise Dubois, came with 38 seconds left. Florida recovered the ensuing onside kick to secure a second straight triumph in a New Year's Six bowl.

"They're an excellent team," Gators Coach Dan Mullen said of Virginia. "You saw that all year. You saw they kept battling, kept fighting. They've got a hell of a quarterback, made a ton of plays."

Florida had gone ahead by two scores on Trask's one-yard run with 9:33 to play. That touchdown was possible after tailback Lamical Perine gained two yards on fourth and one from their 44.

Perine was named the game's most outstanding player after leading Florida (11-2) with three touchdowns, two rushing and one receiving. He gained 138 yards on 13 carries, including a 61-yard touchdown run in the game's opening minute, as the Gators rolled up 549 yards of total offense.

The closest Virginia came in the second half was 27-21 with 13:05 left in the fourth quarter, when Perkins completed a seven-yard touchdown pass to wide receiver Joe Reed. The Cavaliers lined up in a formation with tackle Ryan Swoboda split out wide to the right.

Swoboda provided a block that allowed Reed a clear path to the end zone on the short throw from Perkins.

"Bryce is the exact person we were hopeful to have lead our program," Cavaliers Coach Bronco Mendenhall said. "And I'm talking person first and player second. It was and is the perfect fit. I couldn't have hoped for anything else."

The defenses for both sides dug in during a mostly scoreless third quarter until McPherson booted a 49-yard field goal to extend Florida's lead to 27-14 with 16 seconds to play.

On the previous series, Virginia averted potential disaster when Gators linebacker Jonathan Greenard sacked Perkins on a blitz for a nine-yard loss while stripping the ball loose on third and 10. Cavaliers wide receiver Billy Kemp IV, however, fell on the ball at the Florida 48.

Perine closed the scoring in the first half with a 10-yard touchdown run to give the Gators a 24-14 lead with 2:13 to go. The play unfolded four plays after a conversion on fourth and eight thanks to Trask's 11-yard completion to wide receiver Freddie Swain.

One possession earlier, the Gators reached the Virginia 6, but the Cavaliers permitted zero yards on the next three snaps. Linebacker Noah Taylor and safety De'Vante Cross had pass breakups during the red-zone stand that resulted in McPherson's 23-yard field goal to make it 17-14.

Virginia had tied the score at 14 seven seconds into the second quarter. Perkins completed a nine-yard scoring throw to Dubois in the back of the end zone, capping a 14-play, 88-yard drive.

Dubois, a senior, out-jumped Marco Wilson to secure the acrobatic catch even as the cornerback was in tight coverage on the Cavaliers' reception yardage leader.

Virginia's first appearance in a New Year's Six bowl game since the inception of the College Football Playoff in 2014 marked the final game for a senior class that endured a 2-10 record in Mendenhall's first season before a swift turnaround.

That group includes senior defensive end Eli Hanback, who played in his school-record 52nd game. Hanback is the only member of the roster to have played in every game since Mendenhall took over in 2016.

Two of Hanback's most decorated defensive teammates, however, were only able to offer support from the sideline: Linebacker Jordan Mack and cornerback Bryce Hall were unavailable because of injury.

Mack came onto the field roughly 90 minutes before kickoff riding a push scooter that supported a cast over his right leg below the knee. The senior, who leads ACC players at his position with 7 1/2 sacks, had surgery for a badly damaged ankle and missed his first game this season.

Hall also had surgery on his left ankle months ago and was back in South Florida for the first time since his season-ending injury Oct. 11 during a 17-9 loss to Miami. Hall announced at the end of last season he would be coming back for his senior year despite drawing strong interest from NFL clubs.

"I think we're showing it's fairly rapid what's happening," Mendenhall said. "Not all the pieces are in place, but many of them are coming together, allowing us to show I think pretty steady improvement."

gene.wang@washpost.com

Read more on college football: