“The corporate welfare commission and military acquisition reform are two things the president-elect wants to do very soon,” Rahm Emanuel, Mr. Obama’s chief of staff and a participant in the meeting, said in an interview. The new administration is already preparing to introduce legislation echoing a previous McCain bill on the commission idea, Mr. Emanuel said, adding, “We have been very respectful and solicitous of his ideas.”

Mr. Emanuel said he did not remember any discussion of Iraq. “Barack has been clear that he is going to stick to his responsible reduction in forces, and he hasn’t changed from that,” he said.

Image Senator John McCain has been courted by President-elect Barack Obama. Credit... Todd Heisler/The New York Times

But Mr. Graham, who accompanied Mr. McCain to the meeting, said Mr. Obama took a notably different tone toward Iraq than he had during the campaign, emphasizing the common ground in their views.

“He said that he understands that we had differences but he wanted to let us know that he also understands that we have got to be responsible in how we leave Iraq,” Mr. Graham recalled. “What the Obama-Biden administration has talked about is not losing the gains we have achieved. ”

He added, “Obama does not want to be the guy who lost Iraq when it is close to being won.”

Mr. Emanuel, whose only previous contact with Mr. Graham was negotiating the terms of the presidential debates, began calling him more than once a week to follow up. “Constantly,” Mr. Emanuel said. “There has been a running dialogue.”

Mr. Graham, in turn, called his counterpart “a pleasure to do business with.”

Vice President-elect Joseph R. Biden Jr., a friend since Mr. McCain was the Navy’s liaison to the Senate three decades ago, has also played intermediary. He called Mr. McCain to ask him to appear at the inaugural dinner, and he invited Mr. Graham on another recent trip to Iraq and Afghanistan.