Everything boiled down to one heart-stopping possession, but No. 10 South Carolina finally managed to drop anchor on the Naval Academy.

Again, sophomore running back Marcus Lattimore gets a lot of the credit along with a sometimes maligned defense that stopped Navy and the triple-option offense twice in the fourth quarter after USC took the lead for good.

Lattimore rushed 37 times for a career high 246 yards and three touchdowns and powered into the end zone for the go-ahead score with 12:45 remaining as USC staved off Navy for a 24-21 victory in the 2011 home opener, surviving a major scare from the stubborn Midshipmen in front of a crowd of 78,807 at Williams-Brice Stadium.

"It was a typical game, I guess, when we face a team that runs the triple option," USC head coach Steve Spurrier said. "They stayed on the field a while but we stopped them at the end. I told our defensive guys that I was really proud of our defense for stopping them in the fourth quarter when the game was on the line."

USC improved to a perfect 3-0 with its sixth straight regular season victory and its 15th win in the last 17 home games. It's the third time in Spurrier's seven seasons as head coach that USC has started with three straight wins.

Lattimore's 246 rushing yards represent the fourth highest single-game total in USC history. He fell 32 yards shy of the school record.

"We had a hard time tackling Lattimore," Navy head coach Ken Niumatalolo said. "The guy is a heck of a back. I'm very proud of our men but we didn't come here for any moral victories. We played hard, but unfortunately it wasn't good enough."

Just like last week, Lattimore saved his best for the late stages of the game. He had 128 yards rushing on 24 carries in the second half, 13 carries for 55 yards in the fourth quarter.

USC ran 37 plays in the second half, with 24 being rushing attempts by Lattimore. He carried the ball 10 times for 55 yards on the eventual game-winning 15-play touchdown drive spanning 5:50 that bridged the third and fourth quarters.

"Obviously, Marcus has a tremendous game," Spurrier said. "We figured the best way to win the game was to just hand it to him and keep blocking."

Both teams had seven meaningful possessions in the fast-moving game that took less than three hours to complete. USC scored three touchdowns and kicked an important field goal on the final snap of the first half in their seven possessions.

Navy had three possessions lasting 11 or more plays, while USC had four consecutive possessions of 10 or more plays in the second and third quarters.

Spurrier, who had never faced Navy, is a perfect 43-0 all-time against schools from outside the BCS, including a 17-0 mark since becoming USC's head coach in 2005. But this one may have be the closest he has ever come to falling to a non-BCS team.

"This is the kind of game you can lose," Spurrier said. "We scored 17 points in four possessions in the first half and I thought we were playing lousy. We should have had four touchdowns. That clock keeps running when you play a team like Navy. When they stay out there with seven- or eight-minute drives and you don't score or go mess up, that's how you get beat. That's how Navy beats a lot of teams."

The Gamecocks have come-from-behind for all three wins this season. They trailed East Carolina, 24-21, in the third quarter, trailed Georgia, 35-31, in the fourth quarter and trailed Navy, 17-14, in the fourth quarter.

Not bad for a program not known for rallying late to win games.

"Hats off to Navy," Lattimore said. "I'm glad they're not in the SEC because as far as playing your assignment and doing what you're supposed to do every play, they were the best team I have ever faced. They were very fundamentally sound. I knew we were going to have to run the ball. We didn't get as many possessions as we wanted and as many as we usually get, but we knew we were going to have to run the ball to win the game."

The victory also went against three significant trends. USC had been 3-26 under Spurrier when losing after three quarters, while Navy had won 24 of its first 26 games under Niumatalolo when it scored first as it did on Saturday night with a fourth quarter touchdown.

In addition, Navy had been 24-0 when it led at the start of the fourth quarter since Niumatalolo took over as head coach in 2008.

USC posted its second straight three-point win after outlasting Georgia 45-42 last week in Athens. USC is now 5-5 under Spurrier in games decided by three points or less.

"Maybe it's a good sign that we're winning close ones," Spurrier said. "If you have a big year, you always look back at some of those close ones that you win. We've got a lot of work to do. Vandy is a good team coming in here next week. We're happy to get this one behind us."

The Gamecocks host Vanderbilt in a battle of unbeaten SEC East teams next Saturday at 7 p.m. in the first of seven consecutive SEC matchups, a stretch extending into mid-November.

The victory wasn't secured until Antonio Allen intercepted a rare Navy pass with exactly one minute remaining in the game.

Trailing 21-17, USC drove 79 yards in 15 plays to take the lead for good. Lattimore scored from 7 yards out after Navy had scored the only touchdown of the third quarter to take the lead after three quarters.

The Gamecocks finished with 254 rushing yards, while Navy had 274. The Midshipmen ran the triple option flawlessly most of the night, but were held scoreless over the final 18:35.

USC totaled 458 yards of offense compared to 335 for Navy, and piled up 27 first downs to 15 for the Middies.

Stephen Garcia was 18-of-25 passing for 204 yards in his best performance of the season. He was sacked twice. USC's top two receivers were Jason Barnes and Lattimore, both of whom had four receptions.

Nick Jones had three catches for 52 yards in his coming-out party for the Gamecocks. Alshon Jeffery, who finished with two receptions for 35 yards, did not start the game because he violated a minor team rule, Spurrier said.

Garcia said afterwards he will take the hard-fought win.

"If you look at Auburn last year, they came from behind several times. They did it against us as well," Garcia said. "That's what we've been focusing on the entire offseason, playing well in the fourth quarter and getting out of there with a win. We're pretty happy to be 3-0 right now."

Bruce Ellington fumbled the opening kickoff of the second half - fortunately it was recovered by the Gamecocks - and a block in the back penalty forced the Gamecocks to start from the 8-yard line.

Behind Lattimore's strong running (six rushes for 42 yards on the drive), USC moved into the Navy red zone before an odd play call proved disastrous.

Despite the fact Lattimore was carving up the Navy defense (19 carries, 162 yards at the time), Garcia dropped back to pass and was belted by a Middie defender. The ball floated into the arms of a Navy defender around the 5-yard line to halt a promising drive.

The Midshipmen exploited a major bust by the USC secondary by converting a 33-yard pass on third-and-10 en route to driving 91 yards on 11 plays to take the lead, 21-17, with 3:35 left in the third quarter.

With Lattimore and Jones making all the plays, USC drove to the Navy 29 when the third quarter ended.

Showing he had learned his lesson, Spurrier called Lattimore's number on the first four plays of the fourth quarter. The sophomore surpassed the 200-yard mark for the second time in his career in the process.

Moments after Garcia sneaked for a first down on fourth-and-inches, Lattimore powered over from 7 yards out to hand USC the lead for the second time, 24-21.

USC ran the ball the final eight plays of the 15-play, 79-yard drive.

The USC defense came up with key stop on third-and-7, stopping Proctor for a loss of a yard, to force Navy to punt for the second time on the night. The punt bounced out of bounds at the USC 44 with 10:46 left in the contest.

Relying extensively again on Lattimore, USC moved inside the 5-yard line until a false start penalty moved the ball back five yards.

Eventually, the drive boiled down to a fourth-and-2 at the Navy 5. USC pitched to Lattimore, but he was dropped for a 1-yard loss to hand the ball to Navy for one final chance at an improbable victory.

Navy converted a fourth-and-15 with a 16-yard pass to give themselves life. But it was short-lived as Allen stepped in front of a Navy receiver and intercepted a pass at the USC 45 to end the drama. He took a couple of steps and smartly fell to the turf.

USC had survived.

As expected, the matchup turned into a run-fest early with the two teams combining for 311 yards on the ground in the opening 30 minutes.

But it was a kicker who proved to be the difference as Jay Wooten boomed a 48-yard field goal through the uprights on the final play of the second quarter to give USC a 17-14 halftime lead.

USC scored the final 10 points of the first half after falling behind 14-7 early in the second quarter.

Lattimore rushed 13 times for 118 yards in the first half to go over the 100-yard mark for the third straight time this season. But Navy ran the triple option to perfection for most of the first half, piling up 196 rushing yards on 29 carries as they constantly kept the Gamecock defense back on their heels.

Garcia was 10-of-15 passing for 117 yards in the first half. Barnes led USC with three receptions for 39 yards as Jeffery was blanked in the first half.

After Navy quick kicked on fourth down, USC's first play from scrimmage produced a 31-yard run by Lattimore to the Navy 48. The Gamecocks picked up 12 more yards on a screen to Barnes, but the drive stalled after that. A flea flicker pass to Ace Sanders fell incomplete.

The Midshipmen took over at their 35 and quickly marched down the field for a touchdown, scoring on a well-executed 27-yard option pitch when Proctor found an open seam and raced down the right sidelines for the touchdown.

USC responded with a seven-play, 71 yard TD drive that began with a pair of completed but quickly turned into the Lattimore show. Starting at midfield, Lattimore carried five consecutive times, including a 21-yard pickup on his first carry of the drive.

Four snaps later, Lattimore powered over from the 6-yard line with 4:47 left in the first quarter for his fifth rushing touchdown of the season and 22nd of his career. After two USC possessions, Lattimore had 82 yards rushing on seven carries.

Navy took over at its 23 and worked the triple option to perfection, rolling 77 yards down the field for the go-ahead touchdown with 13:50 left in the second quarter. By that point, Navy had 154 yards rushing in their first three possessions as they dominated the line of scrimmage.

USC faced a third-and-15 from their 39 on the ensuing possession when Garcia fired a bullet to Jones, who made a brilliant over-the-shoulder catch for a clutch 34-yard pickup.

Re-energized, the USC offense needed just three plays to travel the rest of the way for the tying touchdown. Lattimore capped the 80-yard march with a 6-yard TD through the middle of the Navy defense.

When the drive ended, Lattimore had 112 yards on 15 carries.

With the score tied 14-14, Navy drove inside the USC 40 when they gambled on fourth down. Proctor kept it and dove inside but the USC finally came up with a big play when he was stopped by Devin Taylor about a yard short of the first down marker.

USC took over at the 37 and Garcia converted key third and fourth-down situations by connecting with Justice Cunningham for 12 yards (third-and-7) and 12 yards (fourth-and-10) to move the ball to the Navy 36 with less than 30 seconds left.

Two snaps later, Wooten stepped up and booted a 48-yard field goal as the gun sounded to give the Gamecocks a three-point lead at the break.