It was 1976 and a former California governor named Ronald Reagan wasn't just taking on the Republican establishment, he was taking on a sitting Republican president: Gerald Ford. And he was close to succeeding.
As the convention began in Kansas City, the presence of uncommitted -- and unpredictable -- delegates meant that nobody could tell which candidate was actually in the lead. The New York Times projected Ford with a lead of 39 delegates, while Reagan's campaign claimed he was ahead by 10. Both leads were minuscule given the 2,259 total delegates attending the convention.
Ford's lead delegate hunter was a man who would go on to some of the highest posts in government, but in 1976, James Baker had just one job: Get Ford enough delegates to secure the nomination.
"We had no assurance whatsoever that he would get the majority of the votes necessary," the former White House chief of staff and secretary of state told CNN's Gloria Borger.
This year's convention could see similar razor-thin margins between Donald Trump and Sen. Ted Cruz, but Baker doesn't buy Trump's claim that he should get the nomination if he is close to the magic number of 1,237.
"That's a very good political argument for him to make, but that's not actually the way the process is supposed to work. It's supposed to work in a vote, or a series of votes by the delegates on the floor of the convention. They select the nominee. It is, after all, a party's nominating convention," Baker said.
As the 1976 convention approached, Baker began tracking every single one of the approximately 150 uncommitted delegates, those who weren't already bound to vote for either Reagan or Ford. Baker and his team created dossiers on each of them.
"You need to know everything there is to know about a potential delegate ... what turns them on, what turns them off, what they believe in, what they favor, what they disfavor, who they're sleeping with," Baker said.
Trump, the front-runner, is just starting the delegate outreach effort now.
"They need to be ramping up a sophisticated delegate selection process," Baker said.
"It's a big job. You need to have delegate chairmen. Not just campaign chairmen, but delegate chairmen, in each state, sometimes in each district in each state. That's what we put together when we saw that it was going to be a long, hard, delegate slog to the convention," Baker told Borger. "Some campaigns are really focused on this. They focused on it early -- others are late to the party."
But finding and tracking delegates for your side is just half the battle. Once a delegate committed to supporting Ford, Baker had to make sure he stayed with Ford.
"You stay in touch with him, you work him, protect him to keep him from being stolen by the other side," Baker said. "And then you got to go over and steal delegates from the other guy."
So how does one steal a delegate? You take him out to dinner -- but not just any dinner.
"I bet I went to more state dinners than anyone in the Ford administration with the possible exception of Betty and Gerald Ford because that was a perk that was perfectly legal," Baker recalled.
While both sides played the inducement game, Reagan was only a governor and couldn't come close to offering up the same level of perks.
"If you have an uncommitted delegate, invite him to the White House for a state dinner for the Queen of England -- you don't think you have a good chance of getting his vote? You got a pretty good chance of getting his vote," Baker told Borger.
Baker did, in fact, get that vote. But other delegates had something bigger than dinner on their mind.
One delegate, Baker recalled, wanted a federal job in exchange for his vote. Another wanted the government to go easy on a relative under investigation. Still another wanted a federal building named after him. Baker said no to them all, and with the convention coming on the heels of Watergate, kept detailed records of who had requested what.
After all the wrangling, the actual vote was surprisingly anticlimactic. As more and more uncommitted delegates came to Ford's side, the tide turned against Reagan. Ford would win the nomination 1,187 to 1,070 on the first round of voting. But it was still close.
"We had to get in there and scrabble and fight for it," Baker said. "Ronald Reagan almost knocked off an incumbent Republican president."
The Republican Party left the 1976 convention at least somewhat unified. But this year's fight could be longer and even more contentious. And if the convention rules start changing in the middle of the game, Baker said the damage could linger into November.
"If you have a candidate who's within that, within 100 or 150 delegate votes of getting a majority and you start changing the rules to screw the candidate out of the nomination, I think you're going to buy yourself some grief," Baker said. "His supporters, all of whom thought that they were voting for significant change, are going to feel really put upon, and at the very least, might stay home."