Barack Obama swept into the White House on a message of “hope and change,” a historic figure before he even took the oath of office.

The first African-American to occupy the Oval Office set about “remaking America” on Day One, as he inherited a recession of epic proportions and lingering wars in Iraq and Afghanistan. He talked about seeing the “long game” in trying to set American policy and draw down the number of troops in Iraq and Afghanistan. He won a Nobel Peace Prize, just months into his tenure.

He sought to be a transformational president.

Eight years later, Obama prepares to leave office having overseen a turbulent time in history, filled with the near collapse of Wall Street and American automobile manufacturers, the killing of Osama bin Laden and the rise of new Islamic terrorist groups, racial unrest and rampant gun massacres, the advancement of gay rights, the steady growth of jobs tempered by nagging economic uncertainty, and the adoption of a controversial, complicated and landmark health care plan.

In the end, Obama was a “great policymaker, but not a great party builder,” said Julian Zelizer, a Princeton University professor and historian who organized a recent meeting of scholars to assess Obama’s legacy. The strategies that made him successful early in his tenure (passing legislation by narrow, partisan majorities, and refraining from promoting accomplishments) made his party and his legacy vulnerable, he said.

The Democrat leaves a policy record that could be remembered as “impressive” and “significant,” Zelizer said — if it’s not totally undone by President-elect Donald Trump.

advertisement | advertise on newsday

“He was a president who took over at a very difficult moment and he used his first two years in office to get some very big changes through, policies that were significant and had an effect,” Zelizer said. “After 2010, he did what he could do.”

CNN’s Fareed Zakaria, in a recent Obama documentary, called him “one of the most consequential presidents” in American history, then added: “Notice I didn’t say ‘successful.’ ”

“Every part of the Obama legacy is complicated,” said Meena Bose, executive dean of public policy and public service programs at Hofstra University and director of the Peter S. Kalikow Center for the Study of the American Presidency. “The overarching assessment is that the Obama legacy will be mixed.”

Obama hit the ground running and completed an aggressive agenda in his first two years that included “Obamacare” and a massive economic stimulus package. Then, when Republicans gained control of Congress, he ran into a political stone wall that lasted for the next six years and triggered his reliance on executive orders to get around the legislative branch of government. The way he did things, though, made Democrats vulnerable — contributing to widespread party losses in Congress and state governments.

Yet his election and re-election represented a cultural impact that can’t be measured. And, at the same time, the setbacks to his Democratic Party can be: losing more than 1,000 seats in Congress, state legislatures and governor’s mansions, according to The Associated Press.

DOMESTIC AGENDA

Recession, bailouts, guns, energy and human rights.

Obama came into office inheriting the worst American economic crisis since the Great Depression. He engineered an $800 billion stimulus plan to try to get things back on track, piloted an automobile industry bailout, and pumped money into faltering banks and financial institutions.

He leaves with unemployment at a nine-year low, the stock market continuing to set records and the auto industry healthier. Oil imports, which a decade ago supplied two-thirds of Americans’ power, now account for less than half, thanks to natural gas and solar power expansions. Yet the Democrat hasn’t been able to shake the perception of many Americans that they are being left behind economically. Recent polls show about two-thirds of voters viewed the economy as not good or poor.

Obama defenders say he took dramatic steps to save the national economy, yet note it hurt him politically.

advertisement | advertise on newsday

“We saved the economy from a failing financial system, though we lost the country doing it,” Timothy Geithner, Obama’s first Treasury secretary, wrote in his memoirs.

Critics said Obama was heavy-handed and the way the stimulus bill was accomplished set the tone for the opposition for the rest of his tenure.

“When he first came in, I’m talking about leading up to the inauguration, I didn’t sense any animosity toward President Obama — his Inauguration Day was probably the largest ever in history,” said Rep. Peter King (R-Seaford), who declined an offer by the administration to become ambassador to Ireland. “In the first month, he came in [to meet with Republicans], he was treated very politely. He was very friendly to us. Then came the stimulus bill.”

King’s view is Obama “made very little effort at all” to include Republicans. The congressman acknowledged that “the Republican leadership” wanted a unified opposition against the legislation while adding: “But my recollection is that he didn’t make any effort to reach out. It was going to be a Democratic bill and, really, it all went downhill from there.”

Zelizer and others contend that, if anything, Obama might have been too timid with the stimulus bill. The plan could have been more robust, projects built by the stimulus should have been easier to define — and promote — to Americans about what was getting accomplished. This issue, rather than Obamacare, is perhaps where the president spent too much political capital for too little political gain.

advertisement | advertise on newsday

“Critics say, and I think it’s a fair point: He should’ve done more in the [economic] crisis of 2008,” Zelizer said.

Another key part of his domestic agenda was gun safety.

It wasn’t originally high up on Obama’s list upon entering office, but with gun massacres climbing sharply — mass shootings in Newtown, Connecticut; Aurora, Colorado; Lafayette, Louisiana; and elsewhere — it became a priority. Obama, much to his disappointment, couldn’t get restrictions on semiautomatic weapons and requirements for background checks for gun owners through Congress, despite the rising death toll.

He wiped a tear from his eye when talking about the Newtown schoolchildren. He moved an entire South Carolina church to stand up and sing when he extemporaneously began “Amazing Grace.” But he couldn’t move the Republican-led Congress.

Obama called it a “shameful day for Washington” when Republicans defeated a proposal he offered after the Newtown shootings. Advisers called it “deeply depressing” for the president.

“If you ask me where is the one area where I’ve been most frustrated, most stymied, it is the fact that the United States of America is the one advanced nation on earth in which we do not have sufficient, common-sense gun safety laws,” the president said in a recent interview.

Congressional Republicans were unlikely to agree to any gun-control measures, and Democrats generally haven’t pushed very hard or tried to avoid the subject, said Robert Shapiro, a Columbia University political scientist, “but Obama couldn’t because of the shootings that occurred.” Because opposition to gun control is so strong among Republican voters, he was unlikely to win any compromise, Shapiro said.

Obama was more successful in trying to advance gay rights. Originally an opponent to same-sex marriages, Obama changed his mind — before the U.S. Supreme Court effectively legalized them. His administration ended the military’s “don’t ask, don’t tell” policy, though that came after a military survey that showed attitudes changing. It pushed international aid agencies not to send money to groups that discriminate against gay people and lesbians, and oversaw a policy of issuing passports to transgender people based on gender identification.

But Obama primarily followed public opinion rather than leading it, Hofstra’s Bose said.

“He gets credit because [same-sex marriage] occurred on his watch,” she said. “But he may have been pushed.”

Similarly, Obama presided over an expansion of domestic energy production — natural gas and solar, especially — and a decline in the percentage of oil America imports. A decade ago, about half of the nation’s electrical power came from coal; now, it’s 16 percent, according to federal statistics.

Like gay rights, some of the changes in energy were driven by his administration — especially the push to increase natural gas as a “bridge fuel.” It boosted spending on alternative energy sources, but failed to get a new “cap and trade” law to limit power-plant emissions. Further, markets and technology played a big role, too, in the changing energy scene. But he did drive the U.S. push to get a global climate-change pact in Paris, which would curb the greenhouse gas emissions that have contributed to rising temperatures and sea levels.

On immigration, Obama failed to get approval for a reform plan that would have created a pathway to citizenship for undocumented workers (at the same time deporting 2.4 million — more than any of his predecessors). While he was pushing for more inclusion, millions of Americans grew increasingly angry about immigration and, to some extent, Trump vaulted to the lead in the early stages of the Republican fight for the presidential nomination by being the most outspoken critic of Obama on the topic.

OBAMACARE

Obamacare, the political shorthand for the Patient Protection and Affordable Care Act, became his signature program, a rallying cry for Republicans in every election of the past seven years and the one Obama policy that might hinge most on what Trump tries to do with it.

Obama made near-universal health care a top priority, spending much of his political capital on it — just after getting Congress to approve a huge economic stimulus package. With the Democrats controlling both houses, Congress approved it — almost on strictly party lines. The president signed it into effect in 2010. Since then, the ranks of the uninsured have decreased by 20 million (from an estimated 50 million), the rate of the uninsured is down to 9 percent, and advocates say it will drive down national health care costs over time.

But it came at a high political price.

It birthed the tea party, activists who called Obamacare a government overreach, socialism and more. It became the winning talking point for many Republicans in the 2010 midterm elections and hardened their resolve to oppose most things the president proposed.

Obama had to get health care during his first two years in office, analysts concur. The degree to which the health policy itself hardened the opposition is up for debate.

“The fact of the matter is, partisan conflict is now so deep that if it weren’t Obamacare, it would’ve been something else,” said Shapiro of Columbia University. He pointed out that Senate Majority Leader Mitch McConnell (R-Ky.) vowed to make Obama a “one-term president” by trying to block anything and everything.

“Where do you go from there?” Shapiro said.

Trump and congressional Republicans repeatedly have vowed to repeal Obamacare and replace it with “something better.”

FOREIGN POLICY

Obama’s election arguably was a rebuke of the foreign policies of President George W. Bush, who launched wars in Afghanistan and Iraq in the years after the Sept. 11 attacks. Obama took office with about 140,000 American troops in Iraq and 34,000 in Afghanistan and vowed to bring them back. Slowly, he has done so: his office projects about 9,000 troops will still be in Afghanistan and 5,000 in Iraq when he leaves office.

Just for signaling his opposition to Bush’s initiatives, Obama was awarded the Nobel Peace Prize during his first year in office.

But in his acceptance speech, Obama outlined his position about a “just war.” Over the next seven years, he wrestled with how to respond as revolutions and violence sprouted in Egypt, Syria and Libya.

He gave the green light to an operation that killed Osama bin Laden, who had eluded a Bush-led effort to eliminate him, but couldn’t bring stability to Iraq or Afghanistan and the radical Islamic State terrorists grew. He steadfastly refused to send more American troops overseas while rapidly expanding the use of drones to carry out bombings. He drew a “red line” warning to the regime of Syrian President Bashar Assad about violence against fellow Syrians, then backed away. He reached a nuclear arms deal with Iran that Republicans roundly criticized.

The seemingly intractable conflicts may “show the limits” of what an American president can do, said Robert Jervis, an international affairs professor at Columbia University.

“We still have troops in the Middle East, but at much, much lower levels than before. Obama did wind down the deepest part of American involvement,” Jervis said. “Syria is a nightmare with no good options. He did keep us out. The red line was a mistake . . . When Obama came in, we were talking about Iran getting nuclear weapons in six months. Nobody is talking about that now.”

Jervis said Obama fared reasonably well, but noted the “passivity in Syria” allowed Russia to gain influence there and that critics are “partly right” that Obama shares some of the blame for the growth of ISIS-inspired attacks.

“The attacks are less directed from ISIS than inspired by ISIS,” Jervis said. “It’s an important distinction because even when we smash ISIS, the inspiration won’t go away.”

Retired Lt. Gen. Jim Dubik, author of “Just War Reconsidered,” told The Associated Press that Obama pursued a “minimalist” approach in reaction to Bush’s “maximalist” approach, but that the Democrat is prolonging the war.

But Hofstra’s Bose contended: “The news on the military front, as bad as it is, could have been worse. It’s the dog that didn’t bark.”

RACE RELATIONS

President-elect Barack Obama takes his oath of office on Jan. 20, 2009, on the steps of the Capitol in Washington D.C. His wife, Michelle, holds a Bible. Photo Credit: Newsday / J. Conrad Williams Jr.

Obama’s election guaranteed him a place in history as the United States’ first black president. It was a breakthrough that not only uplifted African-Americans but also was supposed to signal that American politics had entered a “post-race” era. While the former proved true, the latter did not. An unprecedented milestone was met with a “birtherism” backlash and rising racial tensions.

Obama’s win in 2008 over Republican Sen. John McCain was heralded as smashing the “last racial barrier” in American politics.

“It’s been a long time coming,” Obama said the night he won in 2008. “But tonight, because of what we did on this date in this election at this defining moment, change has come to America.”

His election itself was “probably the most significant cultural impact in modern times,” said Christopher Emdin, a science-education professor at Columbia University who works with urban school districts and minority students.

“Who knows when we’ll see that kind of cultural impact again?” Embdin said. He said Obama’s success told many African-Americans you “belong” — especially young people.

“I have seen 15-year-olds walking around with an air of confidence and identity that I have not seen before,” Emdin said. “By virtue of his genotype alone, young people saw the possibilities . . . It was trigger for conversations with young people about education and resilience. The fact that his mother was a single mother — people were using his life story, in real time, to motivate.”

Emdin and others pointed to the now-iconic photograph of the president bending over to let a 5-year-old boy touch his head after the tyke asked if they had the same kind of hair. Obama’s mere presence in the White House changed the perspective for millions, Loretta Augustine-Herron, a former activist who worked with Obama in Chicago, told The Associated Press.

“You can’t put a price tag on that,” Augustine-Herron said. “If he never did anything else for African-Americans, just the fact that he occupies the White House, it lets us see ourselves in a different light . . . We see a chance for us to fit into the United States society in a way we’ve never fit in. Just knowing that opportunity is not everybody else’s, it’s OURS, too . . . The sky is the limit. And it was never that feeling before.”

At the same, there was a push back from some in the African-American community, especially scholar Cornel West and talk show host Tavis Smiley, who criticized Obama for not doing more to “champion their causes more passionately and more vocally,” Emdin said. West even called Obama a “counterfeit” who posed as a progressive.

“There was a little bit of bitterness . . . I think that was more from the adults,” Emdin said. “But the young people? Obama couldn’t do any wrong in the eyes of the young people.”

Obama appointed the first two black attorneys general and the first Latina Supreme Court justice.

The irony is, many noted, race relations soured over the last eight years.

Tensions rose between African-American communities and police, after deadly encounters in Ferguson, Mo., Florida and even New York City. There was the “beer summit” his first year in office, when Obama brought together the Cambridge, Mass., police officer who arrested Harvard University professor Henry Louis Gates for trying to get into his own home — an idea that was largely criticized afterward.

Obama’s election also triggered a backlash that seemed to first gain voice on the House floor during his first year in office. Rep. Joe Wilson (R-S.C.) interrupted an Obama speech to shout “You lie!”

And the “birther” controversy — the false idea, driven by some conservative and right-wing groups, that he wasn’t born in the United States and therefore was ineligible for office — dogged him for years. It was even advanced by now President-elect Trump, who said Obama needed to show a birth certificate to disprove the lie.

“I can’t imagine that happening to any other president,” David Axelrod, a former Obama adviser, said recently. “It’s indisputable that there was a level of ferocity and lack of respect given to him that was a function of race.”

But for some, growing partisanship was the main issue. Race just added more fuel to the fire for some who opposed Obama.

“The political polarization and animosity of many Republicans would have existed anyway,” Princeton’s Zelizer said. “If you say it’s just Obama, then what was the drive to impeach Bill Clinton? That goes beyond race. But it is clear that race added to the fire for some parts of the GOP.”

POLITICAL LANDSCAPE

In 2008, Obama rolled to a huge win and Democrats swept the House and the Senate. Eight years later, Republicans control both houses and Trump won the Electoral College vote.

Not only that, but Republicans reportedly will have control of the executive and legislative branches in 25 states — up from 10 when he took office.

Some of this is the swing of the political pendulum, but some can be pinned on Obama.

“The president often fought with [Republicans] and was engaged in politics and public partisanship more than he should have,” said Rep. Lee Zeldin (R-Shirley), who won office in 2014, another GOP wave year. “I think it helped him consolidate his own power and maintain high enough favorability numbers for himself. But it harmed his ability to get more accomplished and it certainly hurt the brand of the Democratic Party.”

Obama, in an interview with National Public Radio, contended that he “bent over backwards consistently to try to find compromise and a legislative solution to some of the big problems we’ve got” but it was Republicans who refused to negotiate.

The president “underestimated the level of partisanship” in the nation, Princeton’s Zelizer said. If anything, he said Democratic allies now think it was a mistake for Obama to not be tougher on the opposition to force them to compromise.

That perhaps speaks to Obama having fewer political skills than the last Democrat to occupy the White House, Bill Clinton, said Hofstra’s Bose.

“Both Obama and Clinton faced strong objections on policy,” Bose said. “To some degree political skills matter and I think it’s fair to say President Obama did not have the political skills that President Clinton had.”

“Obama was supposed to be the change candidate,” Columbia’s Shapiro said. “He wasn’t able to do it,” which was what led to the candidacies of Trump and, on the Democratic side, Sen. Bernie Sanders of Vermont. But the story of the Obama tenure also has to include the rise of partisanship, the tea party’s impact on mainstream Republicans and Trump’s impact on both.