How did we get from Barack Obama to Donald Trump? The two presidents seem so dissimilar that it’s tempting to conclude they come from separate worlds. But in important ways, Obama set the stage for Trump.

To say the two men brought incredibly different approaches to the presidency is a dramatic understatement. Throughout his two terms, Obama governed with a deep respect for government institutions and overall stability. Although he came into office with a strong mandate from the 2008 election, his political temperament led him to seek out compromise positions with Republicans from the outset. As president-elect, he placed two Republicans in his Cabinet and nearly secured a third, which would have been an unprecedented level of bipartisanship.

Obama’s legislative agenda was likewise crafted with an eye to bipartisanship. A third of his economic stimulus package was dedicated to tax cut proposals, many of them previously advanced by Republicans, while his plan for health care reform drew in equal parts from Mitt Romney’s program when he was governor in Massachusetts and the Republican alternative to President Bill Clinton’s health care initiative in 1993.

As Obama extended olive branch after olive branch to the GOP, congressional Republicans repeatedly swatted them away. In a January 2009 meeting, House Republicans vowed to become, in the words of Minority Leader John Boehner, "an entrepreneurial insurgency" that would fight the Democrats on all fronts. At the same time, Minority Leader Mitch McConnell laid out a similar plan in the Senate. As Sen. George Voinovich of Ohio later recalled, the Republican plan was straightforward — whatever Obama proposed, they would oppose: "If he was for it, we had to be against it."

The Republicans’ full-throated resistance to Obama proved to be an electoral winner. Confrontational candidates aligned with the Tea Party movement helped the GOP retake the House in 2010 and then the Senate in 2014. As the Republican caucus moved further to the right, they took the leadership of the House and Senate with them. Routine issues of government housekeeping like the debt ceiling now became, in McConnell’s words, "a hostage that's worth ransoming."

The Republican approach that came into focus in the Obama years laid the groundwork for President Trump. Like his Tea Party predecessors, many of whom are now his key congressional allies, Trump is determined to wreck the norms and procedures that previous presidents followed. Indeed, his presidency has revealed that the long stability of the office often depended on the commander in chief abiding by norms and informal customs.

Although we do have a complex system of checks and balances, as well as rules that create limits on what political leaders can do, it turns out there is a great deal of leeway for a president who is willing to break with precedent. Unlike previous presidents, who sought to project an image of transparency, Trump has done the opposite — for instance, refusing to release his tax returns and hiding the White House visitor logs.

While Obama aimed for bipartisanship, Trump has followed the Tea Party plan of playing to the most extreme and radical elements of his political coalition. Instead of seeking points of unity, he wants to divide. Rather than shift to the middle to win over more Americans, he has stoked the anger of his base through a series of partisan political rallies that have made his presidency an extension of his campaigns. Rather than reach out to leaders of the opposition, he has resorted to mocking them on Twitter.

These hard-edged changes in Washington have been mirrored in the nation. While some elements of the news media became more openly partisan during the Obama era, the process clearly accelerated under Trump. Networks such as Fox News have become much more comfortable with being tools of the party, with prominent figures like Sean Hannity openly campaigning with the president.

As social media sites like Twitter and Facebook weaken our filters, our public commons has become even more of a Wild West of information and disinformation. Again, the breakdown of our media ecosystem was well underway during the Obama presidency, but he tried to fight it. He refused to make decisions based on the "noise" of the day and was careful in the ways that he entered into the public eye. Recently, the former president warned Democratic candidates to tune out the media echo chamber, which he believes clouds the judgment of leaders. In contrast, President Trump has moved all in. He rose to power with shrewd exploitation of the unstable world of cable news and social media and, as president, has exacerbated all of its most alarming tendencies.

In many ways, Obama’s America and Trump’s America feel like separate nations. But in truth they are bound to one another, a reminder that Newton’s Third Law of Motion extends beyond physics and into politics: For every action, there is an equal and opposite reaction.

Kevin M. Kruse and Julian E. Zelizer are historians at Princeton University.