President-elect Donald Trump, who on Tuesday suggested jailing or stripping the citizenship of those who burn the American flag, offered a different view less than six months before joining the presidential race.

During a Jan. 8, 2015, appearance on CBS’s “The Late Show,” Trump told then-host David Letterman that he was “100 percent right” when Letterman said that flag burning represented freedom of expression and that people should be allowed to do so.

“I understand where you’re coming from,” Trump told Letterman. 

Trump's transition team did not immediately respond to a request for comment on Wednesday.

Trump’s appearance with Letterman came as the businessman and reality television star was still contemplating a presidential bid. He would formally join the crowded Republican field in June 2015.

The first segment of the interview touched on Trump’s political ambitions, his disdain for Obamacare and his hair.

During the second segment of the interview, Letterman and Trump started talking about the then-recent terrorist attacks at the office of the French satirical weekly newspaper Charlie Hebdo in Paris. The publication was well-known for publishing material that mocked Islam.

As the conversation turned to freedom of expression, Letterman brought up flag burning.

“Here’s the example that I’m always proud of as an American,” the host told Trump. “People, to demonstrate, they think, we’re really gonna stick it the United States. ‘We’re going to set fire to the flag.’ ”

“Yeah, right,” Trump said.

“And people get — ‘Oh my God!’ ” Letterman said. “Well, no. If that’s how you feel, go ahead and burn the flag. Because this country is far greater than that symbol, and that symbol is standing for freedom of expression.”

“Sure. You’re 100 percent right,” Trump said, noting that Letterman seemed worked up about the issue. “I understand where you’re coming from. It’s terrific.”

On Tuesday morning, Trump took to Twitter to say that “nobody should be allowed to burn the American flag.”

If they do, Trump wrote, “there must be consequences — perhaps loss of citizenship or year in jail.”

The president-elect’s tweet appeared to have been inspired by news coverage of an episode at Hampshire College in Amherst, Mass., where students burned a flag in protest of Trump's election victory over Democratic nominee Hillary Clinton.