Politicians are, well, politicians, and their charm and glad-handing is sometimes driven more by expediency and ambition and less by true friendship. But having some sense of how candidates relate to one another can offer clues for the future — especially if one is elected president.

Moments before the start of a recent presidential debate at Dartmouth College, Mitt Romney and Herman Cain flung open the doors to their closet-size green rooms and ran into Newt Gingrich.

"Oh my ...," Gingrich marveled. "I'm looking at the ticket right now."

Then he went in for the kill. "I just don't know how you're going to feel about being vice president, Governor Romney," Gingrich deadpanned.

Was that gentle teasing among friends? Full-out mockery? Or was Gingrich taking a dig at Romney, whom he is now battling in the polls for the top of the field?

Whether in private moments like this one, recounted by a witness, or in front of millions of viewers at presidential debates, candidates come bearing years of shared history, relationships — or grudges — just beneath the surface.

So don't always believe what you see. Politicians are, well, politicians, and their charm and glad-handing is sometimes driven more by expediency and ambition and less by true friendship. But having some sense of how candidates relate to one another can offer clues for the future — especially if one is elected president.

Sen. Joe Biden said, famously, in 2007, that Sen. Barack Obama was "not yet ready" for the presidency. But a year or so later, Obama pronounced the two of them fast friends from their days on Foreign Relations Committee and picked him as his running mate. Was the choice based in friendship, calculation, policy passions — or maybe some sort of combination?

Here is a look at the Republicans' relationships:


True-blue friends

Waiting to take the stage at last week's foreign policy debate in Washington, Gov. Rick Perry of Texas poked his head into Jon M. Huntsman Jr.'s green room with some words of encouragement.

"Let's go, big guy," Perry shouted.

Perry and Huntsman are perhaps closer than any other pair of candidates. They got to know each other when Huntsman, the former governor of Utah, led the Western Governors Association. They worked together on issues like water and border security, often grabbing dinner and socializing at association meetings.

Once onstage, their chumminess shone through during commercials. At the third break, Perry walked over to Huntsman and patted his stomach. Then, the two men wrapped their arms around each other, and walked off toward the wings.


Everyone's buddy

As House speaker, Newt Gingrich was known as one of the most divisive figures in Washington. But perhaps because he has been a party stalwart for so long, he seems to have developed relationships with all the candidates. He plays the role of genial professor, often turning debate moderators' questions back on them rather than attacking his fellow Republicans.

Gingrich, in fact, wrote the forward to Perry's book, "Fed Up!"

Gingrich and former Sen. Rick Santorum of Pennsylvania have known each other for two decades as fellow members of Congress, where they worked on welfare reform. And he and Romney have gotten together socially with their wives.

Herman Cain is perhaps closest to Gingrich. When Cain came to Washington as a lobbyist for the National Restaurant Association in 1996, Gingrich was just beginning his ascent as speaker.

At the most recent debate, in Washington, the two men, whose lecterns were next to each other, cracked private jokes as the other candidates were speaking.

Their friendship has proved politically expedient to Cain, who often struggles with weighty policy questions, and has sometimes deferred to Gingrich.

Earlier in the month, at a Lincoln-Douglas style debate, after Gingrich finished up an answer on Medicare, Cain said, to laughter: "At this particular juncture I'm supposed to have a minute to disagree with something he said, but I don't."


An outcast no more

In the Republican contest four years ago, Romney found himself ostracized and ignored amid a clubby group of senators and national security hawks led by Sen. John McCain. Though now he is seen by many as the candidate to beat, he is no longer the odd man out. At debates, Romney makes a point of shaking hands with everyone, before standing alone as he prepares to take the stage.

"Unlike last time, he feels closer to everyone in the crowd," said Ron Kaufman, a senior adviser to Romney.

And yet, some frenemies — a cross between a friend and an enemy — do remain.

"I can tell you who it's not," someone close to Romney said with a laugh when asked to name his best candidate pal. "It doesn't rhyme with smerry." (Team Perry did not dispute the characterization).

It is no secret that there is little love lost between Perry and Romney, the former governor of Massachusetts. Though they overlapped as governors, Perry did not endorse Romney during his presidential bid four years ago, a snub Romney has not forgotten. And Perry, an old Eagle Scout, remains irked by what he believes was Romney's slight of the Boy Scouts at the Salt Lake City Olympics in 2002. The Scouts were not allowed to participate in the Olympics.

It did not help that when Perry entered the race, he did so as a clear alternative to Romney, whom conservatives remained hesitant to rally behind.

At the debate at the Reagan Library in Simi Valley in September, Perry's on-stage campaign debut, there was more waiting than usual, and the candidates split into small groups. Perry and Romney warily eyed one another, taking stock and marking their turf.

There is also little warmth between Romney and Huntsman, both the sons of wealthy Mormon families. When Romney ran for president in 2008, Huntsman endorsed his rival, McCain, a slight that still burns. Now, the two men are cool to each other, offering perfunctory handshakes but little else.


The missing pal

Romney's real friend in the field was Tim Pawlenty, the former governor of Minnesota who is no longer in the race and has already endorsed Romney. But just because the two men are close does not mean they were above a healthy dose of mind games and one-upmanship.

At one early debate, at St. Anselm College in New Hampshire, aides to Pawlenty had planned to level a particularly pungent attack at Romney — tagging him with the label "Obamneycare," to suggest that Romney's Massachusetts health plan had inspired a similar overhaul by Obama.

But intentionally or otherwise, Romney may have pulled off a pre-emptive green room strike of his own.

Waiting to take the stage, he greeted Pawlenty like the good friend he is, warmly wishing him luck in the debate. Pawlenty never used his acid one-liner, and he later told aides that in the future, he would prefer to spend less time mingling with his opponents before debates.


Comrades in cold

Nothing brings two candidates together like polling at the bottom of the heap.

Santorum and Huntsman have both struggled for media and voter attention, and during debates, are often relegated to the outskirts of the stage, receiving fewer questions and airtime than their fellow candidates.

"It gets a little lonely over here in Siberia from time to time," Huntsman joked from one end of the stage at a recent debate in South Carolina.

"Tell me about it," parried Santorum, from the other end.

In most debates, when a candidate uses his or her rival's name in their response, the rival then gets 30-seconds to respond; Huntsman and Santorum have joked about mentioning one another in their answers, in an effort to throw some much needed airtime each other's way.

So, has it ever worked?

"No, it hasn't," Santorum said with a laugh.

The heat of debates can also have the unintended effect of forging even the most fervent of frenemies as comrades in arms.

When Perry had his now-famous "oops" moment — when he struggled to name the third government agency he would eliminate — it was Romney who threw him a lifeline, suggesting the Environmental Protection Agency. After, Romney explained to an aide that watching Perry flail onstage was like watching a car crash, and he just wanted to get him out of the car as quickly as possible.

At the next debate, Perry was even able to joke about his memory mishap.

"Yeah, so tonight if I need a lifeline, I'm just going to look to you, OK?" Perry told Santorum, laughing and high-fiving him.

Jim Rutenberg contributed reporting.