The Trump rally may have more room to run, but investors were put on notice Monday that the path higher might no longer be so smooth.

The weekend chaos and backlash that followed President Donald Trump’s signing of an executive order late Friday temporarily restricting immigration from seven Muslim-majority countries was blamed for a “risk-off” reaction across global financial markets, undercutting equities, including U.S. stocks, while bolstering assets viewed as traditional havens, including gold, the Japanese yen and, for a while, U.S. Treasurys.

The downturn wasn’t devastating, but it was the first time equities saw a sizable retreat in response to Trump’s actions. Analysts described it as a warning against complacency to investors who had previously focused on the upside implications of Trump’s policy agenda.

“We’re just a few days into this presidency and yet virtually all our clients have expressed concern the Trump White House has spent way too much political capital forging ahead with a wall across Mexico’s border and on defending the order to block U.S. entry of immigrants from several Muslim countries,” wrote Bernard Baumohl, chief global economist at The Economic Outlook Group, in a note.

‘Opportunities to buy’

Market bulls argue that Trump’s pro-growth agenda, which is centered on tax cuts, deregulation and infrastructure spending, remains a positive for the economy and markets. At the same time, trade, immigration and health care proposals carry significant uncertainty, wrote analysts at Wells Fargo Investment Institute, in a note.

They see the combination as a recipe for buying on downturns.

“Consequently, these pullbacks due to uncertainties are likely to be opportunities to buy, especially sectors that are leveraged to the normalization of interest rates and the economy’s growth—industrials, consumer discretionary, and financials,” they said.

The crucial long-term question for investors, however, is whether resistance to Trump’s less market-friendly policies could make it more difficult for him to enact the tax cuts, deregulation and infrastructure spending that has fueled the postelection rally.

“For these current market prices to be justified, the Trump agenda must unfold perfectly,” said David Kotok, chairman and chief investment officer at Cumberland Advisors, in a Sunday note. “But the reverse is under way, and fragmented policy combined with obfuscation is now a growing detriment to growth acceleration.”

See:Tech leaders speak out against Trump’s immigrant ban

The Dow Jones Industrial Average DJIA, -0.87% and the S&P 500 SPX, -1.11% trimmed losses but posted their biggest one-day declines of the new year.

‘All Trump’

Investors continue to take their cues largely from the White House.

“It seems as though the market’s focus is all Trump, all the time,” said Michael Arone, chief investment strategist Boston-based State Street Global Advisors, with $2.3 trillion in assets under management.

When the new administration has focused on pro-growth policies and deregulation, “the market applauds,” Arone said, in a phone interview. “When they focus on more controversial parts of the agenda, whether it’s immigration or trade, the market boos.”

On the applause side, last week’s stock-market gains were keyed largely by moves to revive the Keystone XL and Dakota Access oil pipelines, he said.

The S&P 500 remains up more than 6% since Election Day, while the Dow remains up around 8.8% over the same stretch. Meanwhile, volatility, as measured by the Chicago Board Options Exchange’s Volatility Index VIX, -2.38% , known as the VIX, had approached a three-year low last week, which many analysts viewed as a sign of complacency.

The VIX, often called Wall Street’s “fear gauge,” jumped to its highest level in nearly five months on Monday, but remains low by historical standards.

Geopolitical risk

New administrations are expected to suffer early stumbles, but a highly polarized political environment and Trump’s confrontational approach are widely expected to elevate volatility. And it isn’t just Trump and the U.S., investors are also bracing for more potential political upheavals across Europe, including French and German elections later this year.

But some investors, including Kotok, fear that Trump’s approach will do lasting damage.

“No good can come from this bludgeoning approach to policy-making. But damage can take years to repair,” he wrote.

So what’s next for markets? Some market bulls see the events merely confirming their expectations for a brief near-term pullback.

“The maelstrom our president has unleashed over immigration, and the seven countries under temporary ban, is yet another reason to honor our models’ cautionary stance in the near term,” wrote Jeffrey Saut, chief investment strategist at St. Petersburg, Fla.-based Raymond James, which has around $604 billion in client assets.

Read:4 reasons a big stock-market selloff in February may be in the cards, analyst says:

Saut, however, said investors should remain patient and that “equity markets are only impacted by such events in the short term. Longer term we remain convinced the equity markets are in a secular bull market that has years left to run.”

Arone noted that February is traditionally a weak month for equities in the first year of a new presidential administration, declining by 4% on average. Given the lack of political experience of many Trump administration officials, a somewhat deeper pullback is “plausible,” Arone said, but emphasized that he isn’t forecasting such a decline.

For investors, the more volatile outlook, meanwhile, speaks to the need for diversification, Arone said. A small allocation to gold—around 3% to 5% of a total portfolio—is a “helpful diversifier,” he said.