President Trump is taking heat for questioning why the Civil War had to be fought and suggesting President Andrew Jackson could have mediated the dispute without bloodshed.

The president made the comments in an interview with The Washington Examiner’s Salena Zito.

He dived into Civil War history after citing comparisons between his and Jackson’s campaign for the presidency, describing that race as “nasty” and calling Jackson a “swashbuckler.”

Appearing to cast Jackson as a dealmaker like himself, he propounded a thought exercise:

"I mean, had Andrew Jackson been a little bit later you wouldn't have had the Civil War. He was … a very tough person, but he had a big heart," Trump said. "And he was really angry that he saw what was happening with regard to the Civil War, he said, 'There's no reason for this.'"

He added, "People don't realize, you know, the Civil War … if you think about it, why? People don't ask that question, but why was there the Civil War? Why could that one not have been worked out?"

During his presidency, Jackson confronted South Carolina secession threats and in doing so helped preserve the union, temporarily. But Jackson died in 1845, 16 years before the start of the Civil War – which was driven largely by the clash over slavery and other issues.

Set to air on SiriusXM, Trump's comments questioning the reasons for the war touched off a social media frenzy on Monday, with Chelsea Clinton among others seeking to answer the president’s question.

“1 word answer: Slavery. Longer: When Andrew Jackson died in 1845 (16 yrs before the Civil War began), he owned 150 men, women and children,” Clinton wrote.