GAINESVILLE — No. 6 Florida needed an act of God to avoid a homecoming upset. Acts of Loucheiz Purifoy and Jelani Jenkins saved the Gators from the brink of disaster.

Purifoy blocked a late punt and Jenkins grabbed the loose ball and returned it 36 yards for the game-winning touchdown with only two seconds left to play, giving Florida a 27-20 win over Louisiana-Lafayette Saturday at Ben Hill Griffin Stadium.

"I just stuck my hand out, got a little nip of the ball," Purifoy said. "That's a once-in-a-lifetime feeling. That's a great feeling."

Jenkins added: "It was a great play by Loucheiz, and he got that block. He executed it perfectly, and I just happened to be in the right place at the right time. I was surprised I happened to be there, but it came right to me, and I just tried to run as fast as I could."

UF coach Will Muschamp was distracted while the game-deciding play was unfolding on the field. He was busy planning the Gators' final possession after Purifoy got his hand on the kick.

"I was thinking, 'Just get on it. We're in [field-goal] range. Let's don't mess this thing up,'" Muschamp said. "I was going to bleed the clock down to three [seconds] and kick it. . . . I actually looked at the scoreboard and watched the touchdown from the scoreboard."

Instead, the Ragin' Cajuns invaded The Swamp and nearly got out alive. The Gators, bruised and beaten from a rigorous SEC schedule, looked far from lively.

Multiple issues on both sides of the ball plagued Florida on Saturday.

Perhaps the most glaring weakness was the Gators' stagnant offense, which came into the weekend ranked 103rd nationally.

Florida struggled to move the ball early, amassing just 63 yards on its first five offensive possessions combined. The Gators averaged only 2.4 yards per play on those drives.

"Eventually, the players need to understand that they need to take some responsibility to know what to do and have a little bit more urgency about what to do," Muschamp said.

Florida put together consecutive scoring drives of 85 and 72 yards, increasing its lead to 13-3 early in the third quarter. Then, Louisiana-Lafayette fired right back.

On the strength of two third-down penalties committed by Lerentee McCray and Purifoy, the Ragin' Cajuns engineered a 77-yard touchdown drive to pull within three points.

The Gators' next possession ended with a blocked punt Louisiana-Lafayette returned 22 yards for the go-ahead touchdown.

Making matters worse for Florida, quarterback Jeff Driskel left the game with an ankle injury and did not return. The offense belonged to Jacoby Brissett.

Brissett's early play seemed to spell disaster. His first three snaps under center tallied just four yards, including a dropped interception by Louisiana-Lafayette safety Trevence Patt.

On the next possession, Brissett was sacked twice. The situation looked bleak for UF.

"It's hard," Muschamp said. "It's very difficult to come in in the middle of a series for a quarterback."

But by the third possession, Brissett settled in.

He led the Gators down the field on a 49-yard touchdown drive, sparked by a 39-yard connection between Brissett and Reed — Florida's only third-down conversion of the second half.

"I kind of feel like I underthrew him and that's what slowed him down," Brissett said. "He made a heck of a play and made the catch."

The Gators' victory marks their sixth in the Swamp this season. Florida's victims at home range from Top-10 teams such as LSU and South Carolina to underwhelming opponents like Bowling Green and Louisiana-Lafayette. The Gators seemed to savor all of them, boisterously celebrating on the field after the ULL win.

"A win's a win, regardless of the opponent," Muschamp said. "You understand the importance of different wins and what it can do for you, but a win is a win, and that's the way I look at it."