Obama and McCain, the 2008 Republican presidential contender, met privately for half an hour Wednesday afternoon in the Oval Office, the outcome of outreach between the two after the Arizona shooting spree that seriously wounded Rep. Gabrielle Giffords last month.
"We talked about a wide variety of issues," McCain said later. "Obviously we talked about immigration, we talked about Egypt, we talked about fiscal issues."
Aides to both men said the discussion centered on areas where they have shared goals, an indication of repositioning by both the president and the senator in the aftermath of the 2010 midterm elections.
Obama contacted McCain after the Arizona senator wrote an opinion piece in The Washington Post praising Obama's remarks at a Jan. 12 memorial observance in Tucson for victims of the Jan. 8 attack that left six people dead and 13 injured.
The meeting hardly signals a new friendship. There were tough words exchanged during the presidential campaign in 2008 and hard feelings lingered well after. During a bipartisan meeting on health care in early 2010, Obama pointedly rebuffed McCain's complaints that health care legislation was being written "behind closed doors." Said Obama: "Let me just say this John, because we're not campaigning anymore. The election's over."
On Wednesday, McCain said his relationship with Obama has "always been cordial."
"We look forward to working on some of the issues we discussed," he said.
Asked how often they would confer, McCain joked, "Every morning." He added that more meetings were likely in the future, "but they really depend on the issues."
The White House, in a recap of the meeting, said that the two discussed ways to reduce the deficit and that the president thanked McCain for his longstanding opposition to earmarks, the special spending provisions for pet projects that Obama has said he will oppose in future legislation.
Last year, McCain ran for re-election as a tough conservative, a reflection of the tea party movement that was sweeping the country. But McCain's stance seemed like an odd fit for a politician who made his reputation as a maverick who broke with his party on a number of issues.
"While, yes, it seems as though the relationship has thawed a bit, the fact is that these issues on the table are issues of mutual interest," McCain spokeswoman Brooke Buchanan said.
Not all was perfect harmony between the two on Wednesday.
Following the meeting, McCain called for Egyptian President Hosni Mubarak to transfer power to a caretaker government immediately, saying the conditions in Egypt were deteriorating too quickly. The Obama administration has taken pains to avoid calling on Mubarak to step down immediately, urging instead for a swift transition to a new government.
Later, McCain said he did not tell Obama that he would call for Mubarak's to relinquish the presidency. "I did not want to connect it to our meeting," he said. "We did discuss the overall situation, but I didn't argue for any position. The president makes his decisions. So I didn't want to act like I was influencing his. But obviously we share the same concern."