President Obama talks with senior advisers, from left, Valerie Jarrett, David Axelrod and Dan Pfeiffer. (White House/via Reuters)

President Obama is losing two of his most trusted aides in a White House exodus that will shrink the already small circle of confidants around the president.

Both White House senior adviser Dan Pfeiffer — one of President Obama’s longest-serving aides and top political strategists — and communications director Jennifer Palmieri are leaving the administration in the coming weeks.

The exits come at the same time as a handful of other top staffers are also on their way out this month, including Obama’s senior counselor John D. Podesta and his Ebola strategy coordinator, Ron Klain. Podesta and Palmieri are joining the nascent 2016 presidential campaign of Hillary Rodham Clinton.

The flurry of departures presents a challenge for the president, who has a limited window for action before the political center of gravity shifts toward the 2016 presidential campaign. The Pfeiffer departure means that nearly every member of the team who helped orchestrate Obama’s rise to prominence has left the White House.

Palmieri is one of the president’s top female advisers and has played a key role in the administration’s media relations efforts, first as Pfeiffer’s deputy and then his successor in the top communications job.

“It’s going to be a really strange world without Dan Pfeiffer in the White House,” said Jim Messina, who served as Obama’s deputy chief of staff during his first term and managed the president’s reelection bid. “It now kind of leaves Valerie [Jarrett] and the president as the last two along for the whole journey.”

A White House official, who asked not to be identified in order to discuss personnel matters, said Obama and his chief of staff, Denis McDonough, were discussing how to restructure Pfeiffer’s role and bring on new staff to implement the president’s agenda for the next two years.

“We need energized, new people to do that,” the aide said.

The 39-year-old Pfeiffer, who described his own role in a Post interview as trying to shape how the president and the rest of the nation see “Barack Obama 10 years from now,” has worked doggedly to amplify the president’s message and leave a mark on the Democratic Party more broadly. A workaholic and sports fanatic, he has aggressively experimented with social media and other digital tools to bypass traditional news organizations and communicate directly with the public.

He first joined Obama as a staff member in his Senate office and, over the years, developed a bond with the president that became a friendship based on common interests, especially their love of basketball, said Tommy Vietor, a former National Security Council spokesman.

“Dan has been beside me on every step of this incredible journey, starting with those earliest days of the campaign in 2007,” Obama said in a statement. “And through it all, he’s been smart, steady, tireless and true to the values we started with. Like everyone else in the White House, I’ve benefited from his political savvy and his advocacy for working people. He’s a good man and a good friend, and I’m going to miss having him just down the hall from me.”

During Obama’s first term, Pfeif­fer spent much of it as communications director, a behind-the-scenes job that focused more on developing and disseminating the administration’s message about political and policy initiatives. He had a hand in virtually everything the White House did as he sought to coordinate the message between the West Wing and the vast government bureaucracy, colleagues said.

Pfeiffer developed a reputation for being driven and demanding, often sending co-workers e-mails about news stories at all hours of the night. After suffering a mini-stroke two years ago, he returned to work the next day. He changed his diet and made an effort to strike a better balance in his life.

He was often antagonistic with reporters over their coverage, sending them angry e-mails. Inside the West Wing, Pfeiffer was often the one reminding others that amid the day-to-day scandals that dominate Washington discourse, they should not forget the reasons Obama ran for office.

“He would step back and ask what do the American people care about — jobs, the economy, the big-picture things that you have to be focusing on,” Vietor said.

But the intensely competitive Pfeiffer was often deeply engaged in those arguments. In 2012, he apologized to columnist Charles Krauthammer after accusing him, in a blog post on the White House Web site, of making a ­“ridiculous claim” that Obama had returned a bust of Winston Churchill to the British Embassy that had been displayed in the Oval Office.

“This is 100% false. The bust [is] still in the White House. In the Residence. Outside the Treaty Room,” Pfeiffer wrote. In fact, Krauthammer was right and Pfeif­fer had mistakenly referred to another Churchill bust that had been given to Lyndon B. Johnson.

Palmieri, who served in the Clinton White House and joined the Obama administration in December 2011, played a key role in improving the president’s visibility, and she has a reputation for being able to foster and maintain good relations with members of the national media.

“In our strategic discussions, Jen has been a consistent advocate of the president taking a leading, visible role in engaging the public and driving our message,” White House press secretary Josh Earnest said by e-mail.

Clinton is revamping her communications and press strategy — a minefield for a candidate with a deep distrust of the news media.

A senior Democratic strategist supporting Clinton, who requested anonymity because Clinton has not yet said she is running, said Palmieri emerged last month as the leading candidate to head the former secretary of state’s campaign communications operation. For an image-conscious campaign where men have been identified for nearly all the top positions, according to the strategist, the team wanted a widely respected woman as communications director.

Obama has been criticized by other Democrats and even agency officials inside the administration of at times being too insular, while relying on his small bevy of longtime advisers. One former aide to President George W. Bush cautioned Wednesday that Pfeiffer’s departure, along with Podesta and Klain, could leave the remaining few long-timers with even more power.

Rep. Steve Israel (N.Y.), an influential Democrat with close ties to the White House, said it was not surprising that some of Obama’s staff would want to leave now, when “it’s on a high note.”

The president will continue to be guided by the aides who helped win the White House, even if they are no longer on the payroll. On Jan. 10, a group of Obama’s former aides gathered in the White House to discuss both the upcoming State of the Union address and how to manage the remainder of the president’s term.

Pfeiffer’s alma mater’s basketball team, the Georgetown Hoyas, was playing during the session, according to a participant, prompting Pfeiffer to check his smartphone regularly as the advisers conferred with the president.

At one moment Pfeiffer’s head jerked up, and he quietly uttered a curse word. “Hoyas down by two,” he whispered to a couple of colleagues, by explanation. Georgetown ended up losing.

Some predict more basketball in Pfeiffer’s future. His White House departure “guarantees he will spend the NCAA tournament ensconced in fritos and Yuengling surrounded by 15 TV sets,” CNN’s Jake Tapper wrote on Twitter.

Anne Gearan and Dan Balz contributed to this report.