Only two days after the election, President Obama sat by President-elect Donald J. Trump’s side in the Oval Office and declared that the No. 1 priority in his last days in the White House would be ensuring a smooth transition of power.
What Mr. Obama did not say was that he also intended to set up as many policy and ideological roadblocks as possible before Mr. Trump takes his oath of office on Jan. 20.
With less than three weeks before the Obama White House is history, making way for a new administration with radically different priorities, the president is using every power at his disposal to cement his legacy and establish his priorities as the law of the land.
He has banned oil drilling off the Atlantic coast, established new environmental monuments, protected funding for Planned Parenthood clinics, ordered the transfer of detainees from Guantánamo Bay, criticized Israeli settlements and punished Russia for interfering in the recent elections through cyberattacks.
The next president may be able to roll back some, or even most, of those actions, a point that Mr. Obama’s top aides concede. But every step the current president takes requires Mr. Trump to overcome one more legislative or procedural hurdle as he seeks to change direction in Washington.
Mr. Obama is continuing to fill the ranks of the government with his own appointees; since Election Day, he has named 103 people to senior Civil Service jobs, boards, key commissions and oversight panels, including the National Council on Disability, the Amtrak board of directors, the Holocaust Memorial Council and the boards of visitors at military academies.
He is also pushing ahead with his goal of freeing nonviolent drug offenders from federal prisons. In the last few weeks, he has commuted the sentences of 232 federal inmates and pardoned 78 others. And on Wednesday, he will meet with Democratic lawmakers to discuss ways to protect the Affordable Care Act from efforts by Mr. Trump and Republicans to dismantle it.
To many conservatives, Mr. Obama is acting out of spite as much as conviction. “He’s doing all this stuff as his legacy,” said Newt Gingrich, the former House speaker, comparing Mr. Obama to a petulant god in a Wagner opera. “If he goes through three more weeks of this stuff, who is the country going to think is the extremist? Trump or Obama?”
White House aides note that many of the president’s last-minute actions were put in motion months or even years before the outcome of the election was clear. And none break from the ideological approach Mr. Obama took during his eight years in office.
But they represent a determination by the 44th president to squeeze in every last Obama-era achievement before Mr. Trump — who has vowed to dismantle those achievements — takes over. That has cheered some of Mr. Obama’s liberal allies, who wish he could do even more.
“The Republicans are freaking out because all of a sudden Obama is doing a lot of governing,” said Matt Bennett, the senior vice president for public affairs at the Third Way, a liberal think tank. “They don’t like it. I get that. But he’s in his right to do it, and he should do it. Is he trying to box Trump in? You bet — and he should.”
Mr. Obama’s actions have not gone unnoticed by Mr. Trump and the people working frantically to assemble the new administration. A day after Mr. Obama allowed passage of a United Nations Security Council resolution criticizing Israeli settlements, Mr. Trump angrily wrote on Twitter that the move would “make it much harder to negotiate peace.” Mr. Trump added, optimistically: “Too bad, but we will get it done anyway!”
Two days later, in a sign of his growing frustration with Mr. Obama, Mr. Trump posted again on Twitter, saying he was doing his best to “disregard the many inflammatory President O statements and roadblocks.”
He continued, “Thought it was going to be a smooth transition — NOT!”
That Twitter message apparently prompted a phone call from Mr. Obama the next day, when the president and president-elect tried to re-emphasize their cooperation. Mr. Obama’s spokesman issued a statement calling the discussion positive, saying both men had pledged to “work together to effectuate a smooth transition of power on January 20th.”
That evening, from his Mar-a-Lago estate in Florida, Mr. Trump insisted that the transition was going “very, very smoothly” and said his talk with Mr. Obama had been a “very, very nice” conversation.
“Our staffs have been getting along very well, and I’m getting along very well with him other than a couple of statements that I responded to,” Mr. Trump said.
White House officials are quick to insist that Mr. Obama has ordered all levels of government to cooperate fully with Mr. Trump on the mechanics of the transition. That directive stands, they said, regardless of the ideological gulf that divides the two men.
Nonetheless, it is not uncommon for a departing president to take actions in the waning days of his administration that limit the options for a successor from the other party.
In mid-December 2008, President George W. Bush signed a multiyear status-of-forces agreement with Prime Minister Nouri al-Maliki of Iraq that called for all American troops to be out of Iraq by the end of 2011. Concerns about security and instability in Iraq in 2011 led the Obama administration into talks with Iraqi leaders to leave some American forces beyond the deadline, but the negotiations broke down and Mr. Obama ended up following the timeline he had inherited from Mr. Bush.
“Talk about tying your successor’s hands,” Mr. Bennett said. “Bush was fully within his rights and powers. These are big, very important matters of national security and foreign policy. We have one president at a time. He’s got to act like the president.”
Something similar transpired with the actions Mr. Obama took this past week at the United Nations. By abstaining on the settlement resolution, the United States paved the way for its approval. Conservatives viewed the president’s actions with disdain.
“Obama and John Kerry are like tenants who trash a place as they are being evicted,” Erick Erickson, the author of a prominent conservative website, said on Twitter.
Mr. Obama’s most permanent action may be his order banning oil drilling off the Atlantic coast, a decision rooted in a 1953 law that experts say will be legally difficult for Mr. Trump to reverse. Environmental groups and other liberal advocacy organizations are hoping for more such moves by Mr. Obama, up until his last moments in office.
“The Constitution lays out that the president is president to Jan. 20 at noon,” said Neera Tanden, the president of the Center for American Progress, a liberal think tank in Washington.
Ms. Tanden said Mr. Obama’s actions were bolstered by approval ratings significantly higher than Mr. Trump’s, a historical oddity. Most modern incoming presidents bask in the glow of postelection polling, while those leaving the White House have worn out their welcome.
Mr. Obama is “appropriately reading that as full steam ahead,” Ms. Tanden said. “The president rightly sees that the American people are supporting the actions he is taking.”
White House officials said Mr. Obama would continue to take actions he deemed necessary until Mr. Trump was sworn in. “The president is dedicated to using each of his remaining days in office to build on and solidify” his policies, said Brandi Hoffine, a White House spokeswoman. But officials also say Mr. Obama is unlikely to satisfy the demands of liberal activists who want him to go even further.
In a news conference in mid-December, Mr. Obama noted that tension in his late-term responsibilities in response to a question about the violence in Syria.
“I will help President Trump — President-elect Trump — with any advice, counsel, information that we can provide so that he, once he’s sworn in, can make a decision,” Mr. Obama told reporters. “Between now and then, these are decisions that I have to make based on the consultations I have with our military and the people who have been working this every single day.”
Shortly after the news conference, Mr. Obama headed to Hawaii for his last vacation there as president.