President Obama and his defeated Republican foe, former Massachusetts governor Mitt Romney, will have lunch Thursday in the private dining room at the White House, a show of bipartisan comity three weeks after the conclusion of a tough and often nasty election campaign.

The meeting, their first since the final presidential debate Oct. 22 in Florida, comes amid increasingly antagonistic negotiations between the White House and Congress to avert the “fiscal cliff” of automatic spending cuts and tax increases. Reporters will not be allowed at the private lunch, press secretary Jay Carney said Wednesday.

A Romney aide called the lunch a gracious invitation from the president that the former GOP presidential challenger was glad to accept. Romney also plans to meet with his former running mate, Rep. Paul Ryan (Wis.), while in Washington on Thursday.

Obama first said during his election victory speech in Chicago that he intended to invite Romney to meet with him, then reiterated the idea during a White House news conference Nov. 14.

“He presented some ideas during the course of the campaign that I actually agree with,” Obama said during the news conference, adding later, “There are a lot of ideas that I don’t think are partisan ideas but are just smart ideas about how can we make the federal government more customer-friendly.”

There has been some speculation among pundits that Obama could offer Romney a role in his administration, perhaps at the Commerce Department, given Romney’s business background. But Carney said the president has nothing specific in mind for the former Republican nominee, who co-founded the Bain Capital private-equity firm in the 1980s.

Carney said the lunch is partly intended as a symbolic gesture illustrating a history of peaceful transfers of power in the United States. “The president feels it’s important to continue that tradition,” he said.

Since election night, Romney has all but disappeared from public. He has emerged only in photos taken by bystanders who spotted him pumping gas and visiting Disneyland. He has not tweeted since Nov. 10; his recent Facebook messages are about Thanksgiving.

On Wednesday, a senior aide said Romney has leased office space at Solamere Capital, the Boston private-equity firm co-founded by his son Tagg and Romney campaign finance chairman Spencer Zwick. Romney will not be working for Solamere but will keep a small office there, the aide said.

The modern tradition of post-election meetings between presidential rivals began in 1960, when John F. Kennedy visited Richard M. Nixon at his home in Key Biscayne, Fla., according to historian Michael Beschloss. Kennedy’s victory was so narrow that some feared it would be disputed.

“The first thing Kennedy said was, ‘Neither of us knows who won, do we?’ ” Beschloss said. “He said it with a purpose to see how Nixon would react.” When Nixon acknowledged losing, Beschloss said, “Kennedy breathed an inward sigh of relief.”

Lyndon B. Johnson did not meet with Barry Goldwater after they waged a personal and bitter campaign in 1964, but Nixon resumed the practice after he beat Hubert Humphrey in 1968. (Humphrey turned down an offer to be ambassador to the United Nations.)

Obama met with rival John McCain (R-Ariz.) in Chicago shortly after winning the White House in 2008. That meeting was private as well, but photographers and a pool reporter were given a few minutes of access.

“I think it’s very important as campaigns are getting more and more bitter,” Beschloss said of the tradition. “Maybe it’s less important when it’s not as close an election as 1960 or ’68, but it’s still an election that was deeply felt on both sides.”

This week, Obama launched an aggressive public relations campaign aimed at forcing Congress to accept his proposals to avert a year-end mix of tax increases and mandatory spending cuts that many experts predict could jolt the economy back into recession.

Obama has called on Congress to extend the George W. Bush-era tax cuts for the middle class but allow them to expire for net household income over $250,000 a year. The president says the election results show that voters agree with his approach over that of Romney and other Republicans, who favor extending the tax cuts for everyone.

“There may be ideas that he has with respect to jobs and growth that can help middle-class families that I want to hear,” Obama said of Romney two weeks ago. “So, you know, I’m not either prejudging what he’s interested in doing, nor am I suggesting I’ve got some specific assignment. But what I want to do is to get ideas from him and see if there are some ways that we can potentially work together.”

Rachel Weiner contributed to this report.