She was the chief rival in his first-term “team of rivals” Cabinet.

But on Sunday, outgoing Secretary of State Hillary Rodham Clinton served as President Obama’s chief cheerleader— and the feeling for a half-hour of prime-time television was gushingly mutual.

The two smiled, bantered and chuckled like chums throughout their appearance on CBS’s “60 Minutes,” the first time Obama has been interviewed as president with a person other than his wife.

It was a performance, tracing with little turbulence the course of their relationship, by a pair of all-pro politicians whose public lives and future legacies are entwined. The message: This all worked out well, don’t you think?

The praise Obama used to describe his chief diplomat, whom he once notoriously called “likable enough,” will serve as a heavy dollop of whipped cream on Clinton’s record, at least for Democrats already inclined to hold her in high regard.

“I just wanted to publicly have a chance to say thank you,” Obama said when asked by Steve Kroft, the interviewer, why he wanted to appear with Clinton on the program. “I think Hillary will go down as one of the finest secretaries of state we’ve ever had.”

In the interview, conducted Friday afternoon at the White House, Clinton called her relationship with Obama “warm, close” and said they share “a sense of understanding that sometimes doesn’t take words.”

Obama said that a rough 2008 election has helped forge a “strong” friendship between them. Sitting side by side — and watching the other intently as he or she delivered answers — Obama and Clinton said the acrimony of those primaries evaporated quickly.

But they also acknowledged that the bitterness of a nasty campaign lingered longer among their staffs and spouses.

Those staff suspicions colored relations between the White House and the State Department during policy debates over Afghanistan and Libya — and never entirely disappeared.

Asked about her initial reluctance to serve as secretary of state, Clinton said she was taken by surprise when Obama told her during a transition meeting in Chicago that he wanted her in that post.

But, she said, she eventually came around.

“I thought that if the roles had been reversed and I had ended up winning, I would have desperately wanted him to be in my Cabinet,” Clinton said.

So, she said, she couldn’t say no to “my president.”

Their mutual televised celebration occurred when Clinton’s political ambitions remain unclear — and as another potential candidate for the 2016 Democratic nomination, Vice President Biden, remains in place and begins what look like early preparations for a national campaign.

Biden has not made his intentions clear. But those close to him say a presidential run is very much on his mind.

Obama has not appeared with him yet in a prime-time television interview. But he has given Biden the leading role in the administration’s push for gun control, an issue of pressing concern for many of the kind of Democrats who decide primaries. Obama and Biden will meet Monday for their weekly private lunch at the White House.

“You guys in the press are incorrigible,” Obama said when asked if his kind words about Clinton had “an expiration date.” “I was literally inaugurated four days ago, and you are talking about elections four years from now.”

The interview focused largely on the Obama-Clinton relationship rather than on specific foreign policy or political questions.

Looking back, Clinton said Obama made clear in offering her the job that she would “have to get out there” in the world while he focused on the economic crisis — and that his promise of a hard job ahead proved true.

Obama said Clinton, generally, was instrumental in helping end the Iraq war, winding down the one in Afghanistan and sharpening the counterterrorism focus on al-Qaeda.

He also said Clinton “set a standard of professionalism” within the first Cabinet, which included a number of seasoned and strong-willed Washington veterans.

Clinton now gives way to Sen. John F. Kerry, the Massachusetts Democrat whom Obama has chosen to succeed her.

She and Obama laughed through questions about her political future — and, by extension, Biden’s. But her health remains a question and she addressed it.

Clinton said she has recovered largely from the concussion she suffered last month, although she wore the glasses she did on Capitol Hill last week that correct the double vision she is still experiencing.

Obama, for his part, said he couldn’t begrudge her some time off after her frequent-flier record in recent years.

“I’m going to miss her,” he said. “Wish she were sticking around.”