After three quarters of being gashed by an inferior opponent, Florida’s defense stood tall when it mattered most.

When Louisiana-Lafayette completed a 17-yard pass to set up first-and-goal on UF’s 7-yard line, the defense seemingly flipped a switch. A touchdown would have put the Gators’ anemic offense in an 11-point hole early in the fourth quarter, bringing one of the biggest upsets in school history closer to a reality.

But Florida’s defense answered by forcing two incomplete passes and smothering wideout Harry Peoples after a 2-yard check down, holding Louisiana-Lafayette to a field goal and keeping the offense in position to make its comeback in No. 7 UF’s 27-20 win Saturday.

Coach Will Muschamp said the goal-line stand was one of the game’s turning points.

“That was huge,” defensive tackle Sharrif Floyd said. “Coach was on the sideline going bananas, and we don’t like when he’s going bananas. … We all came together and talked about it before the snap of the ball that we (would play) all three downs aggressive.”

The Gators’ defense was equally stiff the rest of the game, forcing the Ragin’ Cajuns to go three-and-out on each of their final three possessions.

After averaging 6.1 yards per play over the game’s first 41 plays, Louisiana-Lafayette gained only 1.3 yards per play over its final 12 snaps.

Cornerback Loucheiz Purifoy said the Gators needed time to adjust to the Ragin’ Cajuns’ fast-paced attack.

“They tempoed us a lot,” Purifoy said. “We just had to overcome it. We made plays when it counted.”

Floyd echoed the importance of Florida’s adjustments. As the coaching staff learned which Lousiana-Lafayette plays were giving Florida the most difficulty, they prepared the players to stop them.

Floyd said the Gators benefitted when they figured out the Ragin’ Cajuns blocking scheme because “they kept running pretty much the same thing.”

“Once we got it down and understood what they were trying to do to us … we stuffed that,” Floyd said. “They had the edge, they had the momentum for a minute. Coach came to the sideline, he corrected it. We went in at halftime, he corrected more, and we came out and just played our Gator ‘D.’ ”

Purifoy said another key was stopping Louisiana-Lafayette’s speed sweeps and perimeter rushes. The fix required only small adjustments and continued physical play from Florida’s defensive backs.

“We played physical,” Floyd said. “We played our normal style ball. A lot of mistakes on our part, but we’re going to get better.”

UF’s defense gave Louisiana-Lafayette three first downs via penalty. Linebacker Lerentee McCray was also guilty of an offsides penalty on a third-and-10 incompletion, putting the Ragin’ Cajuns in a third-and-5 situation they were able to convert.

The Gators were flagged 10 times for 79 yards.

“The penalties just killed us in the game,” Muschamp said. “We’ve talked about it. We’re going to re-emphasize it. … That’s where we really got hurt.”

The Gators forced only one turnover in the game — a Peoples fumble caused when Floyd chased him down from behind after a catch and punched the ball free.

Still, UF’s defense did enough to win.

“We played well,” linebacker Jelani Jenkins said. “We played hard and stayed aggressive.”