David Axelrod, Mr. Obama’s longtime strategist, said the joint efforts show that the two men have forged a strong relationship over the last four years. “When you’re president, there are very few people to whom you can turn who really ‘get’ what the job demands,” Mr. Axelrod said. “President Clinton has been the source of very good advice, and very meaningful support.”

Privately, Democrats portray the evolving alliance as more utilitarian. “Once Obama’s out of office, I doubt they’ll take family vacations together,” said a former Clinton aide who has also worked for Mr. Obama and asked not to be named to avoid offending either man. “But Clinton thinks it’s critical for the country that he gets re-elected, and will do whatever he can to see that that happens.”

Another Democrat who has worked for both men said: “There’s no love lost. But Bill Clinton is not stupid. He knows if he can give a little of his 60-percent-plus approval rating halo to Obama, and Obama does well, that only helps Clinton. And it helps the missus if she wants to run.”

Hillary Rodham Clinton, who lost the Democratic nomination to Mr. Obama in 2008 only to join his cabinet as secretary of state, has made clear that she will step down after this term no matter what happens in the fall election. But in recent months, people in the Clinton orbit said she has left the door more open to running for president again in 2016, a campaign that would benefit from Mr. Obama’s good will.

By many accounts, the president and the secretary of state get along fairly well despite their epic clash four years ago. He felt comfortable enough teasing her during his comic performance at the White House Correspondents’ Association dinner on Saturday night, referring to pictures of her drinking a beer during a recent trip to Colombia.