WASHINGTON — President Trump is upending the United States economy, and perhaps jeopardizing his re-election prospects, with an abrupt escalation of protectionist trade policies.

Mr. Trump announced on Thursday that he would soon impose a 5 percent tariff on imports from Mexico, which could quickly grow to 25 percent, unless Mexican officials stop the flow of immigrants across America’s southern border.

The move capped a furious month of cross-border tariff threats that has rattled investors and raised economists’ concerns about a slowdown in global growth. Just three weeks ago, Mr. Trump increased tariffs on $200 billion worth of Chinese goods and started the process to tax nearly everything China sends into the United States. And he said the United States was prepared to impose tariffs on autos from Europe and Japan in six months, setting a tight deadline for those governments to reach trade deals with the Trump administration.

Stock prices continued to slide on Friday after a monthlong retreat, with the S&P 500 down more than 6 percent this month. The bond market is flashing worrying signs of a global recession. On Thursday, a daily index of economic policy uncertainty, compiled by economists at Stanford University, the University of Chicago and Northwestern University, spiked to levels not seen since the prolonged government shutdown at the start of this year.