President Trump has described the impeachment proceedings as a “coup,” and his White House counsel has termed them “unconstitutional.” This would come as a surprise to Alexander Hamilton, who wrote not only the 11 essays in “The Federalist” outlining and defending the powers of the presidency, but also the two essays devoted to impeachment.

There seems little doubt, given his writings on the presidency, that Hamilton would have been aghast at Trump’s behavior and appalled by his invitation to foreign actors to meddle in our elections. As a result, he would most certainly have endorsed the current impeachment inquiry. It’s not an exaggeration to say that Trump embodies Hamilton’s worst fears about the kind of person who might someday head the government.

Among our founders, Hamilton’s views count heavily because he was the foremost proponent of a robust presidency, yet he also harbored an abiding fear that a brazen demagogue could seize the office. That worry helps to explain why he analyzed impeachment in such detail: He viewed it as a crucial instrument to curb possible abuses arising from the enlarged powers he otherwise championed.

Outlook • Perspective Ron Chernow, is the author of biographies of Alexander Hamilton, George Washington and, most recently, Ulysses S. Grant. is the author of biographies of Alexander Hamilton, George Washington and, most recently, Ulysses S. Grant.

Unlike Thomas Jefferson, with his sunny faith in the common sense of the people, Hamilton emphasized their “turbulent and changing” nature and worried about a “restless” and “daring usurper” who would excite the “jealousies and apprehensions” of his followers. He thought the country should be governed by wise and illustrious figures who would counter the fickle views of the electorate with reasoned judgments. He hoped that members of the electoral college, then expected to exercise independent judgment, would select “characters preeminent for ability and virtue.”

From the outset, Hamilton feared an unholy trinity of traits in a future president — ambition, avarice and vanity. “When avarice takes the lead in a State, it is commonly the forerunner of its fall,” he wrote as early as the Revolutionary War. He dreaded most the advent of a populist demagogue who would profess friendship for the people and pander to their prejudices while secretly betraying them. Such a false prophet would foment political frenzy and try to feed off the confusion.

[The Senate is likelier to remove Trump after impeachment than you think]

So haunted was Hamilton by this specter that he conjured it up in “The Federalist” No. 1, warning that “a dangerous ambition more often lurks behind the specious mask of zeal for the rights of the people than under the forbidden appearance of zeal for the firmness and efficiency of government. History will teach us that . . . of those men who have overturned the liberties of republics, the greatest number have begun their career by paying an obsequious court to the people; commencing demagogues, and ending tyrants.”

Throughout history, despots have tended to be silent, crafty and secretive. Hamilton was more concerned with noisy, flamboyant figures, who would throw dust in voters’ eyes and veil their sinister designs behind it. These connoisseurs of chaos would employ a constant barrage of verbiage to cloud issues and blur moral lines. Such hobgoblins of Hamilton’s imagination bear an eerie resemblance to the current occupant of the White House, with his tweets, double talk and inflammatory rhetoric at rallies.

While under siege from opponents as treasury secretary, Hamilton sketched out the type of charlatan who would most threaten the republic: “When a man unprincipled in private life[,] desperate in his fortune, bold in his temper . . . despotic in his ordinary demeanour — known to have scoffed in private at the principles of liberty — when such a man is seen to mount the hobby horse of popularity — to join in the cry of danger to liberty — to take every opportunity of embarrassing the General Government & bringing it under suspicion — to flatter and fall in with all the non sense of the zealots of the day — It may justly be suspected that his object is to throw things into confusion that he may ‘ride the storm and direct the whirlwind.’ ” Given the way Trump has broadcast suspicions about the CIA, the FBI, the diplomatic corps, senior civil servants and the “deep state,” Hamilton’s warning about those who would seek to discredit the government as prelude to a possible autocracy seems prophetic.

[Congress isn’t just a co-equal branch. We’re first among equals.]

At the time of the Constitutional Convention, foreign powers, notably Britain and Spain, still hovered on America’s borders, generating fear of foreign interventions in our elections. Hamilton supported the electoral college as a way to forestall these nations from seeking “to gain an improper ascendant in our councils. How could they better gratify this, than by raising a creature of their own to the chief magistracy of the Union?” He prophesied that competing countries would try to clip the wings by which America “might soar to a dangerous greatness.” That Trump was so cavalier about Russian meddling in the 2016 election and then invited Ukraine to furnish defamatory material about his political rival Joe Biden would have shocked Hamilton and the other founders, all of whom were wary of “the insidious wiles of foreign influence,” as George Washington phrased it in his farewell address.

In defending impeachment in two “Federalist” essays, one might have expected Hamilton to engage in close textual analysis, parsing the exact meaning of “Treason, Bribery, or other high Crimes and Misdemeanors.” Instead he couched his defense in broad political language, stating that impeachment should “proceed from the misconduct of public men, or, in other words, from the abuse or violation of some public trust.” In short, the president didn’t need to commit a crime per se. “If the federal government should overpass the just bounds of its authority and make a tyrannical use of its powers,” the people must “take such measures to redress the injury done to the Constitution as the exigency may suggest and prudence justify.” Trump’s telephone call with the Ukrainian president would seem to suggest a clear abuse of power and possibly a campaign finance violation, although we will need a fair and impartial inquiry to confirm this. As Hamilton wrote, “Caution and investigation are a necessary armor against error and imposition.”

Knowing that impeachment would be divisive, arousing violent party agitation, Hamilton never wanted it used lightly or capriciously, but neither did he want it relegated to mere window-dressing. It was a tool intended for use as conditions warranted. “If there be no penalty annexed to disobedience, the resolutions or commands which pretend to be laws will, in fact, amount to nothing more than advice or recommendation,” he wrote. For Hamilton, each branch of government required a mechanism to check encroachment by the others. He discerned a perfect symmetry between the president’s veto over legislation, constraining congressional overreach, and presidential impeachment, curbing executive excess. In his notes for the New York state convention to ratify the Constitution, he jotted down: “Legislative in the Congress, yet checked by negative of the Executive. Executive in the President, yet checked by impeachment of Congress.”

Throughout his “Federalist” essays, Hamilton foresaw impeachment as a possible two-step process and noted multiple times that after removal from office, an impeached president would “be liable to prosecution and punishment in the ordinary course of law.” He was adamant that the Senate should hold a trial, with the chief justice presiding, and pointed out that other Supreme Court justices should be excluded in case the ousted president then became a defendant for his misdeeds in the regular court system.

Our constitutional system, with its separation of powers, is an exquisitely calibrated mechanism. James Madison, one of Hamilton’s “Federalist” co-authors, noted that no single branch of government “can pretend to an exclusive or superior right of settling the boundaries between their respective powers.” But that is exactly what the president is doing by trying to shut down Congress’s powers of executive oversight.

In the last analysis, democracy isn’t just a set of institutions or shared principles, but a culture of mutual respect and civility. People must be willing to play by the rules or the best-crafted system becomes null and void, a travesty of its former self. We are now seeing on a daily basis presidential behavior that would have been unimaginable during more than two centuries of the American experiment. Not only is Trump himself on trial, but he is also testing our constitutional system to the breaking point. In his worst imaginings, however, Hamilton anticipated — at least in its general outline — the chaos and demagoguery now on display in Washington. He also helped design and defend the remedy: impeachment.