National security adviser H.R. McMaster said President Trump was trying to highlight the importance of keeping Americans safe when he shared videos from a far-right British politician purportedly showing Muslims behaving violently.

McMaster said on "Fox News Sunday" only Trump can say why he decided to retweet the videos on Twitter, but he was coming from a good place with his motivation.

“President Trump is the best judge of why he did that, but I know it was his intention to highlight the importance of creating a safe and secure environment for our citizens to make sure that we have the right laws in place, enforcement mechanisms in place,” McMaster said, “to ensure that at this critical time when ISIS is being defeated in the Middle East is that there is not a return of terrorist and extremist who can pose a risk to the American people to our allies and partners.”

Trump’s tweets have caused drama across the Atlantic as British Prime Minister Theresa May has condemned the president sharing the videos. The Dutch embassy even tweeted at Trump to say one of the videos — which showed a dark-haired boy, alleged to be a Muslim by the extremist politician who posted the video, beating up a light-haired boy — did not involve Muslims at all.

Trump’s use of Twitter has been controversial throughout his time as a candidate and now in the White House.

But, McMaster said the president’s Twitter habit has a role to play in the messaging war.

“The key thing is as you highlight the real risk that these terrorists pose to our citizens that we make sure that we never buy into or reinforce the terrorist narrative, this false narrative that this is a war of religion,” he said. “This is really a conflict that involves terrorists.”