An undated portrait of Andrew Johnson, the 17th U.S. president. (Associated Press)
Editorial writer and columnist

Egged on by his top political adviser, Stephen K. Bannon, President Trump is touting an analogy between his populist administration and that of Andrew Jackson, who was first elected in 1828 as the tribune of Appalachian backwoodsmen — and whose portrait now hangs significantly in the Oval Office.

They’ve got the wrong Andrew. The past White House occupant Trump most closely resembles is the 17th president, Andrew Johnson, who served briefly as Abraham Lincoln’s vice president before Lincoln’s assassination in April 1865 — then ruled turbulently, barely staving off impeachment, over the next three years and 11 months.

As it happens, ostentatious admiration for Jackson is the first point of similarity between Trump and Johnson — though the latter, a Scotch-Irishman of humble origins who rose to represent Jackson’s home state, Tennessee, in the Senate, came by his more honestly.

Like Jackson, Johnson believed there was no contradiction between strong states’ rights and unconditional commitment to the Union, and he never wavered, not even after the Civil War broke out. His pro-Union stance led to his selection as Lincoln’s running mate in the 1864 presidential election: Republicans saw this rare loyal Southern politician as a ticket-balancing pick.

Johnson’s open and thorough racism mattered less to Lincoln’s party than the onetime tailor’s animosity toward the Southern planter class (faintly echoed in Trump’s Queens-bred insecurities regarding Manhattanites and other “elites”). Their aristocratic pretensions annoyed Johnson even if their slave-holding per se did not.

Republicans of Johnson’s time, in short, intended to use Johnson for their own purposes, not for this ideological misfit to become president.

Once he did, however, his stubborn, conflictual and erratic personality proved a constant source of irritation and embarrassment.

Just as Trump has taken to Twitter to berate everyone from Nordstrom to a “so-called judge” who had the temerity to rule against his administration, Johnson transgressed contemporary norms of “presidential” communication.

Flouting his era’s unwritten rule against politicking by the chief executive, Johnson embarked on a national “swing around the circle” for the 1866 midterm election. Shouting and trading insults with hecklers at every whistlestop, Johnson slammed “diabolical” political opponents and denounced the House and Senate as “a body called or which assumes to be the Congress of the United States.”

In one rant, which the Chicago Tribune called “the crowning disgrace of a disreputable series,” Johnson blamed a bloody race riot in New Orleans not on the white ex-Confederates who actually killed 34 African Americans and four white supporters, but on unnamed persons, linked to Congress, who had supposedly exhorted blacks “to arm themselves and prepare for the shedding of blood.”

One hundred and fifty years later, Trump would make a similar demagogic insinuation regarding political violence, labeling President Barack Obama a “founder” of the Islamic State terrorist group, and Hillary Clinton a “co-founder.”

The root cause of Johnson’s conflict with Congress, dominated by Northern Republicans, was his attempt to bring Southern states back into the union by presidential fiat, on terms that were lenient toward ex-Confederates and, accordingly, harsh toward newly freed African Americans.

When Johnson stubbornly refused to change, his erstwhile tactical allies in the party of Lincoln sought impeachment.

But this is where the Trump analogy starts to break down. The Republicans of the 1860s turned on Johnson from a strong position, in both moral and political terms.

Made president through tragic happenstance, Johnson not only lacked legitimacy among the wider public, he also had little or no leverage in Congress, even before he started alienating it.

Trump’s ascent was weird, too — he’s only the fifth president to win office with a majority of the electoral college while losing the popular vote. Obviously, his behavior and his policies dismay more than a few conventional Republican politicians.

These circumstances fuel a persistent hope that the GOP will rid itself of Trump, just as the very different Republicans of Johnson’s time rose up against him. “Given the sheer danger to the Republic as well as to the Republicans, Trump’s impeachment will happen,” predicts liberal journalist Robert Kuttner in an American Prospect article wishfully subtitled “The Inevitability of Trump’s Removal.”

Among the many facts this scenario overlooks are that Trump won election in his own right, legitimately, despite the electoral-popular vote anomaly, and that a large minority of the country — including a majority of Republican voters — still supports him.

If anyone is running scared in Washington now, it’s the Republican establishment, which grumbles here and there but hesitates to cross Trump lest his loyal fans among the GOP electorate turn on them.

Similar though his conduct may be to that of Andrew Johnson, a man widely considered the worst of his predecessors, Trump is far stronger, politically, than Johnson ever was.

Read more from Charles Lane’s archive, follow him on Twitter or subscribe to his updates on Facebook.