The dramatic escalation came a week after the death in Minneapolis of George Floyd, an unarmed black man who had been pinned down with a knee to the neck by a police officer -- leading to the worst civil unrest in decades in New York, Los Angeles and dozens of other American cities.
After being criticized for his silence on the worsening crisis, Trump struck a martial tone in a nationwide address from the White House as police fired tear gas on protesters outside.
"I am dispatching thousands and thousands of heavily armed soldiers, military personnel and law enforcement officers to stop the rioting, looting, vandalism, assaults and the wanton destruction of property," he said.
He slammed the previous night's unrest in Washington as a "total disgrace" and called on governors to act quickly and forcefully to "dominate the streets."
"If a city or state refuses to take the actions that are necessary to defend the life and property of their residents, then I will deploy the United States military and quickly solve the problem for them," he said, denouncing "acts of domestic terror".
After his address, protesters outside the White House were cleared so the president could walk across the street to the two-century old St Johns church, hit with graffiti and partially damaged by fire during unrest on Sunday.
"We have a great country," Trump declared as he stood before the church's boarded up windows, held up a Bible and posed for photographs.
The backlash was swift.
"What the president did today was he called out the American military against American citizens," New York governor Andrew Cuomo said on Twitter.
"He used the military to push out a peaceful protest so he could have a photo op at a church. It's all just a reality TV show for this president."
Thousands of people have participated in the demonstrations against police brutality and racism across the country since Floyd's killing.
It was the most widespread unrest in the United States since 1968, when cities went up in flames over the slaying of civil rights icon Martin Luther King Jr.
Many of the demonstrations have been peaceful and marked by cathartic moments such as officers hugging tearful protesters and marching or kneeling alongside them.
'Tired of oppression'
Others have seen rage-filled clashes between protesters and police. One person was shot dead in Louisville, Kentucky.
Floyd's agonizing death was caught in bystander cell phone video which shows policeman Derek Chauvin pinning him down with his knee for nearly nine minutes as the 46-year-old pleaded for his life with the haunting words: "I can't breathe!"
"The evidence is consistent with mechanical asphyxia as the cause of death, and homicide as the manner of death," Aleccia Wilson, a University of Michigan expert who examined his body at the family's request, told a news conference.
An initial finding cited in a criminal complaint pointed to pre-existing conditions, outraging the family.
Shortly after the independent report, Hennepin County's medical examiner released its official autopsy that called his death a homicide caused by "neck compression," although it also said he was intoxicated and pointed to heart disease.
A memorial for Floyd will take place on Thursday in Minneapolis before a service in North Carolina and a funeral on June 9 in Houston, where he grew up, family lawyer Ben Crump said.
Floyd, 46, had been accused of trying to buy cigarettes with a counterfeit bill.
The autopsy revived demands for the arrest of three other police officers who stood guard for Chauvin as Floyd lay dying.
"We are tired of oppression," said Muna Abdi, a 31-year-old African-American woman at a peaceful demonstration at the Minnesota capitol in St. Paul.
Chauvin has been charged with third degree murder and is due to appear in court June 8.
Curfew in New York, death in Louisville
More than 40 cities have imposed curfews, including New York, after consecutive nights of tension that included looting and the trashing of parked cars.
In the upscale SoHo district, Elliot Kurland, owner of the Leica photography store, said his entire shop was emptied by looters. He estimated his loss at $1 million.
"I had been about to come here at three o'clock in the morning. My brother warned me, 'Don't go down. You'll get killed,'" he said.
Louisville, the home of Muhammad Ali and Kentucky Fried Chicken, has seen especially passionate protests due to the police killing in March of an African American woman, Breonna Taylor, in her own apartment.
Trump spent most of the weekend inside the White House tweeting attacks on political rivals and the media.
In a conference call with governors Monday quickly leaked to media outlets, Trump told state leaders they were "going to look like a bunch of jerks" if they were too soft.
The governor of Illinois, J.B. Pritzker, is heard saying he was "extraordinarily concerned" by the president's "inflammatory" rhetoric.
Joe Biden, Trump's likely Democratic opponent in November elections, met Monday with black leaders at a church in his home of Wilmington, Delaware and promised to form a police oversight commission in his first 100 days as president.
burs-st/ft