In the 11 years that Barack Obama and Sen. Bernie Sanders have served together in the halls of Washington, the two men have crossed paths dozens of times. But in Sanders’s more than 40 visits to the White House since Obama was sworn in as president, visitor logs show that they have had a private meeting in the Oval Office only once: on Dec. 15, 2014.

Now, the White House has confirmed that two will meet Wednesday, a tacit acknowledgment that the senator’s popularity among Democratic primary voters has unleashed a potent political movement that could influence not only the race to succeed Obama but also the president’s legacy.

The meeting will take place at a time when the contest between Sanders (Vt.) and Obama’s former secretary of state, Hillary Clinton, is surprisingly tight — particularly in Iowa, where ­caucus-goers will cast the first ballots of the year on Monday. Democratic voters are choosing between an iconoclast who has emerged as an emotional favorite for liberal activists and an establishment politician who argues that her lengthy résumé and dealmaking ability make her better qualified for the nation’s highest office.

The meeting, which White House press secretary Josh Earnest said would have “no formal agenda,” could draw attention to a slightly awkward reality about the Obama-Sanders relationship: There really isn’t one. Unlike Clinton — a trusted former Cabinet member who has had countless meetings with the president — Sanders has generally flown in his own orbit in Washington. He is not a big sports fan, and he doesn’t play golf. Politically, his leftist positions on economic and budgetary matters have kept him largely away from the table of Washington dealmaking.

Sanders spokesman Michael Briggs would not confirm the meeting but said: “President Obama and Vice President Biden both appreciate that it will be the Democratic voters who determine the Democratic nominee. They have both been fair and impartial throughout the process.”

In a Politico interview this week, the president made clear not only that he is personally closer to Clinton but also that he sees her as well positioned to safeguard his political accomplishments.

Obama and Sanders share a similar liberal outlook on several fronts, including the environment and the rights of gay, lesbian, bisexual and transgender Americans. But the once idealistic senator from Illinois espouses a commitment to pragmatism that is almost anathema to the unapologetically socialist Sanders.

“It’s quite clear that President Obama regards Hillary Clinton as his most natural successor,” said William A. Galston, a Brookings Institution scholar who noted not only that the two“forged a very good working relationship” in office but also that Clinton argues for staying Obama’s course. “Sanders, by contrast, is calling for political revolution.”

Galston said that since so much of what Obama has done in office could be unraveled by a Republican president, or a Democratic successor who disagrees with him, “in some ways he has as much at stake in the outcome of the 2016 election as Hillary Clinton does.”

Obama has pointedly refused to make a formal endorsement in his party’s primary race, even though several of his top aides are helping steer Clinton’s campaign.

“The president has made clear that one of his agenda items this year is to do everything he can to help elect a Democrat, and he plans to spend time on the campaign trail once there is a nominee,” White House spokeswoman Jennifer Friedman said in an email Tuesday. “At the same time, we are running our own playbook and our focus is on moving the ball forward for the American people.”

Speaking on Politico’s Off Message podcast in an interview that posted Monday, Obama rejected the notion that Sanders’s pursuit of the presidency resembles his own 2008 bid more than the one Clinton is waging at this point. Asked whether Sanders is an analogue for him, the president replied: “No. No.”

Well, there’s no doubt that Bernie has tapped into a running thread in Democratic politics that says: Why are we still constrained by the terms of the debate that were set by Ronald Reagan 30 years ago? You know, why is it that we should be scared to challenge conventional wisdom and talk bluntly about inequality and, you know, be full-throated in our progressivism?” the president said. “And, you know, that has an appeal, and I understand that.”

But Obama quickly went on to describe why Clinton is well suited to serve as president, even if her argument lacks some of the emotional immediacy of her rival.

“What Hillary presents is a recognition that translating values into governance and delivering the goods is ultimately the job of politics, making a real-life difference to people in their day-to-day lives,” he said. “I think Bernie came in with the luxury of being a complete long shot and just letting loose.”

Obama and Sanders have a few traits in common. They have both inspired young voters, urging them to become politically active and challenge the perceived orthodoxy of party leaders.

And while both Clinton and her husband have spent their careers cultivating an extensive network of supporters, the president and Sanders have displayed less patience for such niceties. Members of Congress, including many in Obama’s party, often complain that he has not done enough to foster ties with lawmakers. Sanders, who suggested on several occasions in 2011 that it would be healthy if someone ran against Obama from the left, is seen as even less social.

Sanders — who tends to read detailed policy tomes rather than track sports rivalries— never picked up the president’s passion for golf, which Obama tends to keep to his inner circle of friends but occasionally expands to lawmakers in a bid for several hours of schmoozing.

At a rare Washington event that he did attend, a panel discussion hosted by CNN’s Jake Tapper at a downtown bar, Sanders found himself flummoxed when asked what he did for fun. After several different attempts at what he thought was an easy question, Tapper essentially asked Sanders whether he had any friends.

Sanders smiled and again demurred. He has seven grandchildren, Sanders told Tapper: “They are the joy of my life.”

Obama has campaigned for Sanders before: In March 2006, he headlined a rally in Vermont for Sanders and Rep. Peter Welch (D), who ultimately filled Sanders’s House seat. At the time, Obama joked that Sanders had such a devoted following in his adopted home state that he wondered, “How do you campaign where everybody knows you?”

Beyond the one session in the Oval Office, however, the senator’s only other White House meetings with Obama have come when the entire Democratic caucus has visited, or at even larger functions, including bill-signing ceremonies and the first family’s annual Hanukkah party.

Earnest told reporters last week that Sanders visited with Obama “at some point last year,” which appears to be a reference to chats the two have had on the sidelines of various White House events, including last month’s Congressional Ball.

The two men also spoke by phone last year shortly before Sanders announced his support for the administration’s nuclear deal with Iran, and they have consulted on issues such as veterans affairs.

In the three years since leaving the State Department, by contrast, Clinton has had two small meetings with Obama and a breakfast with Biden, as well as an exclusive invite to the White House after-party following the inaugural ceremonies in January 2013, according to the visitor records.

Biden has held private meetings with Clinton, Sanders and former Maryland governor Martin O’Malley, who is also vying for the Democratic nomination.

Sanders’s lack of interaction with the president is not an indication of a poisonous relationship between the two, according to current and former advisers in the West Wing and on Capitol Hill. The lawmakers who have gotten the most personal attention from Obama tend to be those in the middle — wavering centrists. Early in his second term, for example, the president convened a series of meals with a bipartisan group of senators trying to forge a broad budget deal. Sanders, who opposed that group’s focus on changes to entitlement laws, did not take part in the dinners.

And the senator has clashed with the administration on questions of fiscal policy, economic inequality and how to best regulate Wall Street. Sanders joined a group of liberals in successfully blocking the appointment of Lawrence Summers, a former White House economic adviser and former treasury secretary, as chairman of the Federal Reserve, as well as the nomination of Antonio Weiss, a former investment banker, to be the No. 3 official at the Treasury Department.

This week Sanders said he intended to filibuster Obama’s nominee to become commissioner of the Food and Drug Administration, Michael Califf, citing his consulting work for some of the nation’s largest pharmaceutical companies.

Now, Galston said, the president must decide how “explicit” he wants to be in telling voters — particularly African Americans, Obama’s staunchest supporters — how much he wants Clinton to emerge as the Democratic nominee.

“It’s one thing to be sending a political signal that the political class can parse,” he said. “It’s another thing to be writing your name in a signature so big King George can see it without his spectacles.”

John Wagner in Des Moines and Alice Crites and Anu Narayanswamy in Washington contributed to this report.