Trump's comments follow Secretary of State Rex Tillerson saying earlier that the US would offer whatever help necessary to Spanish authorities, and leaders from around the world condemned more deaths on European soil.
"They were having terrorism problems, just like we do", Trump said, speaking about United States Army Gen. John Joseph "Black Jack" Pershing. In some versions of this apocryphal story, Pershing orders his men to dip bullets in pig's blood.
He was referring to Gen John "Black Jack" Pershing, the U.S. governor of the mainly Muslim Moro province from 1909 to 1913.
The fact-checking website Snopes debunked this as an internet-created rumor that picked up steam after the attack on September 11, 2001. But Trump first told the story during a campaign rally in February 2016, as he defended his position of supporting methods of torture, such as waterboarding, on terrorist suspects.
After glitch, govt extends GST return filing deadline by five days
August 20 was the last date for paying taxes and filing GST returns for the month of July. Apart from GSTR 3B, three forms - GSTR 1, GSTR 2 and GSTR 3 - need to be filed.
"And he has his men load up their rifles and he lined up the 50 people and they shot 49 of those people", Trump said.
PolitiFact examined Trump's claim and ruled, "While these writings do provide strong evidence that United States forces used pigs as a tactic against Muslim insurgents, they do not support the claim Trump made".
The more Trump told the story, the more he'd change the details of the myth - in several instances, he said Pershing's solution stopped terrorism for 42 years, or 35 years, or sometimes 25 years - but ultimately, it doesn't much matter.
Trump's mixed messaging sparks concerns of 'emboldened' white supremacists
The president's tweets come in the wake of his many controversial statements since the violence in Charlottesville. Senator Tim Scott of SC said the president's "moral authority is compromised".
Tillerson said USA diplomats in Spain are assisting Americans there, and he asked those who are safe to notify friends and families. "Okay? Twenty-five years, there wasn't a problem", Mr Trump said.
It's also not clear that the Moro were particularly observant Muslims, nor is there evidence that they were pacified by any Pershing military tactic - however unconventional. The Islamic religion prohibits of pork.
Perhaps after all that's been going on lately, Trump finally had an epiphany on the way he should be behaving as president. Within hours of the Barcelona news, the president condemned terrorism in his initial tweet which said the USA "will do whatever is necessary to help".
Deportivo vs. Real Madrid live stream
Deportivo are hopeful of tying up a deal for Arsenal striker Lucas Perez, who appears surplus to requirements at the Emirates. Helping to assuage fears that Real will struggle without the Portuguese has been young winger Marco Asensio.
Trump's stance on the far-right rally in Charlottesville has been widely criticised by political figures around the world.