When President Donald J. Trump tweeted a photo of himself solemnly saluting Andrew Jackson at the deceased president’s Nashville tomb, it was all part of Stephen K. Bannon’s populist plan.

On Wednesday, Trump honored the birthday of Jackson, the seventh American president and founder of the Democratic Party, in his remarks outside the Hermitage, Jackson’s former estate in Nashville, Tennessee. Trump, a Republican, self-promoted himself as the modern-day heir to Jackson’s legacy.

“It was during the revolution that Jackson first confronted and defied an arrogant elite. Does that sound familiar?” Trump said ahead of a rally in Nashville on Wednesday. The president, who noted that his visit to the Hermitage was “inspirational” and that he is big Jackson “fan,” also sang Jackson’s praises earlier that day during an unrelated speech in Detroit, Michigan.

But President Trump’s love affair with the ghost of Andrew Jackson is a relatively newfound one. His only other tweet about Jackson came in July 2013, when he wrote: “Interesting…the last time a Democrat succeeded a two-term Democratic pres. was in 1836 when Martin Van Buren succeeded Andrew Jackson.” (Democratic nominee Hillary Clinton would have succeeded two-term president Barack Obama but was of course defeated by Trump in the 2016 election.)

Trump discussed Jackson briefly last April when he was asked during the primary to weigh in on the issue of deposing Jackson from the front of the $20 bill. Trump, then the GOP frontrunner in the primary, blamed the move on “pure political correctness.”

But the reason Jackson has taken on such a physical and rhetorical presence in the Trump White House is, in fact, primarily because of Bannon, Trump’s chief strategist and the former head of Breitbart. According to officials in the Trump campaign, presidential transition, and administration speaking to The Daily Beast, Bannon would often discuss Jackson’s historical legacy and image with Trump on and after the campaign trail, and how the two political figures were a lot alike.

“[During the race], Trump would say he had heard this pundit or this person making the comparison, and [Steve] would encourage him and tell him how it was true,” a Trump campaign adviser who requested anonymity to speak freely told The Daily Beast. “It was a way to flatter [Trump], too. Bannon and Trump talked about a lot, but this was the president they had casual [conversations] about the most."

Another senior Team Trump official said that “as the transition was underway, he would encourage [Trump] to play up the comparison,” and that “Trump’s campaign and message was a clear descendant of Jacksonian populism and anti-political elitism.”

"[Bannon] is why Trump keeps equating himself with Andrew Jackson. That is the reason why," the aide added.

According to two sources with knowledge of the matter, Bannon had suggested and had given Trump a “reading list” of articles and biographies on Jackson, and reading material on Jacksonian democracy and populism. Stephen Miller, another top Trump adviser, also recommended and offered related reading material to Trump, a senior Trump administration official said.

Miller and Bannon did not respond to emails seeking comment.

“[Trump] has read other biographies and articles [on Jackson] and has taken a strong interest,” the official said. “He was deeply moved by his visit… to the Hermitage.”

The president placed one of these biographies on his desk in the White House, a book that Trump once “ostentatiously showed visiting journalists,” The Washington Post reported, while noting that “it was less clear whether he had read it.”

Bannon’s push has clearly paid off, even affecting the decor of the White House. Along with Trump’s public statements and tributes, the president hung a portrait of Jackson in the Oval Office shortly after entering office in late January. Bannon, a longtime history nerd, has aggressively peddled the Jackson-Trump narrative in interviews over the past few months.

On the day Trump was inaugurated in Washington, D.C., Bannon told The Washington Post’s Robert Costa that Trump’s inaugural speech was ripped from the Jackson playbook.

“It was an unvarnished declaration of the basic principles of his populist and kind of nationalist movement,” Bannon said in January. “It was given, I think, in a very powerful way. I don’t think we’ve had a speech like that since Andrew Jackson came to the White House. But you could see it was very Jacksonian.”

Bannon ought to know: He and Miller reportedly wrote most of the speech and drew inspiration from Jackson.

In an interview with The Hollywood Reporter that ran shortly after Trump’s upset victory in November, Bannon had once again name-checked the president nicknamed Old Hickory.

“Like [Andrew] Jackson’s populism, we’re going to build an entirely new political movement,” he said. “It’s everything related to jobs. The conservatives are going to go crazy… It will be as exciting as the 1930s, greater than the Reagan revolution—conservatives, plus populists, in an economic nationalist movement.”

It’s also worth noting that, as The Daily Beast reported this week, in college Bannon and his friends would jokingly refer to his regular apartment meetings with other student leaders and activists as “The Kitchen Cabinet.” In the early 19th century, “The Kitchen Cabinet” was a term coined by Jackson’s political enemies to describe his group of unofficial advisers.

The parallels between Trump and Jackson are, in many ways, deeply flawed. Jackson brawled with the established elite of the era, whereas Trump has, despite his rhetoric, emboldened them. Jackson came from poverty and was known as a war hero, while Trump was born into wealth and dodged the draft. Trump is a deeply divisive and outwardly bigoted figure; Jackson, however, committed mass murder and ethnic cleansing.

But Bannon doesn’t shy away from invoking controversial or despicable role models. In the same Hollywood Reporter interview in which Bannon discussed Jackson and Trump’s populism, the White House chief strategist favorably invoked, among others, the devil.

“Darkness is good,” Bannon said. “Dick Cheney. Darth Vader. Satan. That’s power.”