SANTA CLARA — Marcus Lattimore surrendered on the spot. He took one look at his knee — his wretched, distorted mess of a knee — and kissed his NFL dreams goodbye.

“I just knew football was over with at that point,” he said, “so I had to find something else to do with my life.”

Spoiler alert: Lattimore didn’t walk away after all. One of the greatest running backs in South Carolina history told his story from 49ers headquarters recently, not long after the latest strenuous workout of his comeback attempt.

The 49ers hope that the onetime supernova can be an impact draft pick in 2014, even if it’s a full year after they selected him. The 49ers snagged Lattimore with a flier — a fourth-round compensatory pick (131st overall) knowing from the get-go that he’d spend a year on the shelf.

Even now, the 5-foot-11, 221-pounder will be competing for a backup role with no guarantees. Lattimore, by his own assessment, is not all the way back, physically or mentally.

But he’s close enough to dream again.

“I’ll probably be pouring out in tears, man, to tell you the truth,” he said, when asked about the possibility of strapping on his helmet at Levi’s Stadium. “I was just hoping to walk again.”

The funny thing is, it didn’t even hurt, at least not physically. On a second-and-10 from the 25-yard line, Lattimore took a handoff as one of the nation’s best running back prospects. Two yards later, his career was in jeopardy.

One Tennessee defender hit him high, the other low, and it was as if someone put Lattimore’s left knee in a blender. He wound up with an eye-chart of an injury: ACL, PCL, MCL — all torn.

That play, the last of his college career, was Oct. 27, 2012, two days shy of Lattimore’s 21st birthday.

“I was just shocked,” he said. “I had no feeling.”

Resigned to the end of his athletic career even before the cart arrived to haul him away, Lattimore spent the next few days mulling a new career. The man who had scored more touchdowns than anyone in Gamecocks history fixed his sights on becoming a chef. He had plans to enroll in an academy for the culinary arts. “Without question,” Lattimore said.

But a funny thing happened on the way the kitchen: The calls started coming. And the letters. And the tweets. And the tears.

And Frank Gore. The 49ers running back, who had overcome his own career-threatening knee injuries out of college, called out of the blue to check on Lattimore’s soul. “It was, ‘How’s your head? How’s your mind?’ That was the first thing he said: ‘How’s your mind doing?’ ” Lattimore said, recounting the conversation.

Lattimore explained to Gore why he was giving up the game, why the only thing he was sure of was that he’d never play again.

“Pray about it,” the 49ers star replied. “I’ve been through the same thing. There are a lot of people who are going to tell you what to do. You have to go with your heart and with what you want to do.”

Gore added one more thing before hanging up.

“I’ve got a gut feeling that you don’t want to quit football,” he said.

Leaning forward in a chair at the 49ers practice facility, Lattimore flashed a wide smile. He now can admit that he thought Gore was a little crazy for saying that.

But Gore had been there himself. He tore the anterior cruciate ligament in his left knee playing spring ball after his freshman year at Miami. The next year, Gore tore the ACL in his right knee.

That’s why Gore slipped to the third round, 65th overall on draft day. Even then, Sports Illustrated called him “the most overrated running back in the draft.”

Now the 49ers’ all-time rushing leader, Gore was watching South Carolina’s fateful 2012 game on TV when he saw Lattimore writhing on the turf. Gore looked on for a few minutes in silence. Then he turned to public relations man Mike Chasanoff and said: “Get me his number.”

These days, the two players can talk face to face. Lattimore spent all of last season on injured reserve, but Gore took him under his wing, teaching him the mental side of the game. One of the things Gore likes to tell him is: “A lot of people are going to doubt you.”

So Lattimore listens, knowing that until he recovers his physical prowess, he will need all the details he can get.

“You don’t even have to talk to Frank to learn so much about the game of football,” Lattimore said. “He’s the best pass-protection back in the league, without question. And (Tom) Rathman, he’s the best running backs coach in the league. And between those two, I learned so much about the little things about the game and how much technique matters when it comes to the NFL.”

Lattimore concedes that he still lacks the first-step burst, the explosiveness through the hole, that once helped him rush for 1,197 yards with 17 rushing touchdowns as a freshman at South Carolina. Lattimore suspects that part won’t come back until he’s on the field again and gets the adrenaline boost that comes from being chased by a defender.

“I would say that’s the last step on the physical side,” he said.

And there’s still the matter of how Lattimore’s mind is doing — the knee is in his head. “Oh, every day,” he said. “That’s part of the life now.”

On the day he was injured, the sellout crowd of ﻿80,250 at South Carolina’s Williams-Brice Stadium gave him a huge ovation. Tennessee players surrounded him on the field to wish him well.

Lattimore missed it at the time. “I couldn’t hear anything,” he said. “I was zoned out at that point.”

But he saw it all on ESPN days later. He was floored.

“So I had to get back up,” Lattimore says now. “I knew I couldn’t give up because I knew that someday somebody would be in the same situation. Somebody was going to have that same exact injury.

“I wanted them to be able to look at me and say, ‘I gave them hope.’ “

Follow Daniel Brown on Twitter at twitter.com/mercbrownie.