President Trump and his backers have recently drawn a lot of attention — and outrage — by threatening something akin to a party purge: Republicans who don’t sign on to Trump’s agenda won’t be endorsed or funded. The uproar isn’t surprising in that it’s yet another violation of political norms in the Trump era. But it’s not an original tactic.

In fact, in the not-too-distant past, another Oval Office occupant tried to impose his will on his party as part of a broad-based rewriting of political norms that also saw him disregard the other branches of government, make expansive use of war powers and face accusations of being a dictator.

That president was Franklin Delano Roosevelt.

Presidents push at the boundaries of their authority in lots of ways, and they bristle against the institutions designed to constrain them. FDR’s example shows how a president can successfully ignore political norms and break through institutional constraints, but also how institutions and citizens can check that power.

To clarify, that doesn’t mean that Trump and FDR are exactly alike, or really that they’re anything alike. There are obvious differences in demeanor, ideology, policy programs and political experience. And while we don’t have modern polling to tell us how popular Roosevelt was, we know he was elected — with healthy majorities — four times. He certainly has his detractors, but he frequently appears on expert survey lists of the greatest presidents. It’s too early to know what Trump’s legacy will be. But so far he’s less popular than any modern president has been at this point in his term, and experts expressed skepticism about his leadership from the very beginning.

Of course, FDR’s successes with the electorate and his high historical rankings don’t excuse his norm violations, nor should a review of his actions be read as a rationale for Trump to follow suit. But the extent to which Roosevelt was able to change other governing institutions and make them more responsive to his agenda demonstrates how much power the presidency really has. A leader who is determined to use it expansively will have plenty of opportunities to do so. At the same time, not all of FDR’s efforts to strengthen the presidency succeeded.

So what did Roosevelt try to do, and how did the system push back?

1. FDR tried to bring down Democrats who disagreed with him

FDR wanted to remake the Democratic Party from a patchwork party of urban machines and Southerners into a liberal, New Deal party. To that end, in the 1938 midterms, he broke with traditions separating presidents from both local party matters and congressional business: He campaigned against conservative, anti-New Deal candidates in Democratic primaries.

The New Deal had been a crucial turning point for the Democratic Party when many of its major legislative items passed in FDR’s first term. But many in the party had historically been suspicious of a strong federal government — after all, this was the party of the South. As Roosevelt’s presidency went on, some Democrats turned away from the president’s policies, believing they went too far. Others were never really convinced in the first place.

Roosevelt toured the country in 1938, giving speeches about the shortcomings of conservative Democrats who had opposed him and describing the virtues of their more liberal primary opponents. Newspaper editors called the effort a “purge,” trying to link it to the far more violent purges of Stalinist Russia. In the end, most of the incumbents Roosevelt campaigned against survived and kept their seats. Furthermore, the Democrats lost seats in the 1938 general elections, casting a pall over the strategy.

Roosevelt was never able to get total control of the party. He did, however, redefine what the party stood for, making it the party of strong federal involvement in the economy and support for an expanded social safety net. And he remained its standard bearer through four elections.

Trump and his advisers seem poised to try to get rid of dissenting Republicans. In October, Vice President Mike Pence’s chief of staff indicated that party donors might participate in an effort to defeat Republicans who haven’t supported the president’s agenda. Former presidential adviser Steve Bannon declared his intention to wage war on congressional Republicans he views as “establishment.” It’s not clear how this will play out, but Trump and his team may find that there’s a reason that, since FDR’s ill-fated 1938 efforts, presidents have limited their involvement in their parties’ congressional primaries. On the other hand, as FDR showed, Trump could have a lasting effect on the GOP even if his electoral efforts fail by changing what it means to be a Republican. Indeed, we’ve already seen signs of that.

2. FDR diminished Congress’s power

Presidents haven’t always been at the center of national policymaking. For the earlier part of the nation’s history, Congress took the lead role. This began to change with Theodore Roosevelt and Woodrow Wilson. But FDR took it to a new level. After taking office amid the Great Depression, he called Congress into a special session and asked for legislation to address the economic catastrophe. Presidents had called special sessions before to deal with pressing matters, but the scope and symbolic importance of the 1933 session broke new ground.

FDR also sought opportunities to assert institutional dominance — even though Congress was controlled by his party. In one case, he asked his aides to have Congress send him “something I can veto” to “show them they were being watched,” in the telling of FDR expert William Leuchtenburg. FDR vetoed more total bills than any president before or after. One of these was a revenue bill, which violated the norm that Congress — not the president — controls the national purse strings.

But in the end, Congress overrode the veto of the revenue bill. And while the New Deal is most closely associated with Roosevelt, members of Congress had plenty of input into what the policies ultimately looked like. Indeed, FDR ran up against limits when he tried to overstep the boundaries between the branches. He did, however, set the stage for a much stronger and more activist presidency.

Trump, for his part, hasn’t shied away from confrontations with Congress. He certainly ignored norms by having public spats with Republican figures like Senate Majority Leader Mitch McConnell and blaming a body in the hands of his own party for not advancing his agenda. But members of Congress have returned fire rather than being cowed by his criticism, such as retiring GOP Sen. Bob Corker’s assertion that the president is not a truthful person. Moreover, Washington’s policy agenda in the Trump era so far hasn’t been particularly Trumpian — instead, it has mostly consisted of standard GOP fare.

FDR’s experience shows what Trump may already be finding out: The presidency’s singular nature gives it some inherent advantages in setting the agenda, but Congress isn’t called a co-equal branch for nothing.

3. FDR attacked the judicial branch

Frustrated with the Supreme Court’s decisions to strike down certain New Deal legislation (including the signature National Industrial Recovery Act in 1935), Roosevelt proposed a law that would have expanded the Supreme Court in an effort to pack the court with more friendly judges. The measure, which would have added a new justice for every person on the court over the age of 70 up to a maximum of 15 members, sparked a furious response.

Across the political spectrum, legislators and citizens worried about the concentration of power in a single person and the erosion of the separation of powers. Members of Congress received angry mail. Once again, Congress pushed back: It declined to adopt the measure as proposed, and the court remained at nine justices.

In the end, Roosevelt largely got his way as the Supreme Court eventually stopped striking down his signature policies — the National Labor Relations Act and the Social Security Act were upheld. But his “court-packing” decision is still used in textbooks an example par excellence of executive overreach and political miscalculation.

Trump too has gone after the judicial branch, but he has used speeches and tweets rather than legislative proposals to express his disapproval. Trump’s disparaging remarks about the judiciary began on the campaign trail, when he referred to the courts as a “rigged system” and attacked Judge Gonzalo Curiel over his Mexican heritage. The attacks have only continued since he became president.

Over time, these attacks could degrade public opinion toward the courts. Confidence in the Supreme Court as an institution has remained relatively stable in recent years. But as public trust in institutions falls in general, and the court becomes an increasingly partisan issue, respect for the court might be at risk, too.

This is a case where FDR’s example might not tell us much about how Trump’s attacks on the court will play out — their attacks on the judicial branch are just too different. That said, Roosevelt may have failed at packing the court, in part, because of public pushback. If Trump were to successfully erode public faith in the judiciary, it may not be able to withstand a step similar to FDR’s.

There are other, less direct echos of FDR actions in Trump’s administration. FDR tried to manipulate the media — first by cultivating the press in order to “orchestrate the headlines,” in the words of one historian, then by establishing a “voluntary censorship” office during World War II. Trump has also sought to control media coverage and call the shots in relationships with journalists, but he has used different tactics and taken a much more antagonistic approach. As in the judicial example above, Trump’s approach has been soft power (public relations) instead of hard power (rules or laws), compared with FDR.

And there are FDR policies that were so thoroughly rejected afterward that they’re less likely to happen now.

Trump hasn’t done anything on the scale of one of FDR’s most controversial actions as president — Japanese internment. That said, some of Trump’s rhetoric and policies have raised fears that the factors that helped lead to internment, such as racial prejudice and “expedience,” are becoming bigger problems, and that ethnic profiling and civil rights violations will become more prevalent and more overt.

And Trump is not likely to repeat one of Roosevelt’s clearest norm violations: staying in office for more than a decade. The 22nd Amendment to the Constitution, passed by wide margins in Congress and ratified in 1951, assured that FDR’s tenure would not be repeated.

So what can we learn from FDR?

It tells us a lot about the presidency — and what Americans value about it — that one of our most celebrated leaders had such an aggressive view of presidential power. But just as FDR expanded the scope of the office, some of his actions also contributed to the creation of stronger constraints.

The term limits example illustrates that when presidents violate norms, political opponents — and even former allies — will push back. But this resistance depends to some degree on the health and legitimacy of other institutions in the system. Trump’s attacks on the media and the judiciary may prove to be more successful than FDR’s because they could undermine that health and legitimacy.

Sometimes pushing at the boundaries of presidential power strengthens the checks on that power. Other times, it illustrates how flimsy and porous those boundaries can be.