President Donald Trump has been lashing out at the Federal Reserve for months, pressing the central bank to halt its campaign of interest rate hikes. He could soon get his way.

The Fed has been steadily increasing rates over the past couple of years on the belief that the economic recovery finally has enough legs to do without the near-zero rates that persisted for nearly a decade since the financial crisis.

But with global growth slowing, trade tensions simmering and the effects of the Fed’s own policies starting to take hold, the central bank is increasingly taking a cautious approach to forecasting rate hikes beyond the one that’s widely expected later this month.

In other words, the Fed will stop if U.S. economic growth cools — probably not the scenario envisioned by Trump, who once suggested the central bank was raising rates because “they think our economy is too good.”

“The economy is poised to slow next year,” said Diane Swonk, chief economist at Grant Thornton, echoing the view of many analysts. “The question is by how much and how fast, and how should the Fed adjust to that slowdown?”

No matter which direction the Fed goes, Trump is unlikely to be satisfied: If the economy continues expanding at its current pace, he’ll criticize further rate hikes; if growth slows, he’ll probably pin some of the blame on the Fed. He has already attributed recent, steep declines in the stock market to Fed policies.

The Dow Jones Industrial Average plunged by almost 800 points on Tuesday amid concern about a possible economic slowdown and whether the U.S. and China can reach a trade deal.

People who know Fed Chairman Jerome Powell say he will do whatever he thinks is best for the economy, not cave in to attacks from the president, particularly since Powell cares about the long-term credibility of the Fed as an institution independent from political pressures. Still, the broadsides have been relentless.

Trump has called the Fed “loco” and last week said he was “not even a little bit happy” with his appointment of Powell, who has increased rates three times since taking the helm of the central bank in February.

“I’m doing deals, and I’m not being accommodated by the Fed,” Trump told The Washington Post. “They’re making a mistake because I have a gut, and my gut tells me more sometimes than anybody else’s brain can ever tell me.”

But his attitude apparently softened after Powell gave a speech that markets interpreted as a sign that the Fed would stop its rate hike campaign sooner than expected.

“I will tell you, he liked the speech,” Treasury Secretary Steven Mnuchin told CNBC on Monday.

Still, another interest rate hike is all but assured later this month, and Powell’s speech was largely intended to emphasize that the Fed’s estimated path of three rate hikes next year will depend on economic data.

“It’s not helpful that Mnuchin would say the president liked what the Fed chair had to say,” Swonk said. “The Fed chair didn’t say it because of the president. … The more cautious tone really was reflective of the fact that the Fed was starting to realize things were slowing down and it might require a shift in policy.”

New York Fed President John Williams underscored the central bank’s readiness to change course on rates depending on where it sees the economy heading.

“There’s a good — like 50 percent chance — that the economy performs faster, inflation picks up a little bit more than we expect, and I think we’re positioned to adjust to that,” Williams said on Tuesday. “We’re well-positioned to adjust our path of interest rates if the economic data disappoint.”

Ultimately, the Fed and Trump have fundamentally different views of the economy. While the administration’s goal is to achieve sustained 3 percent growth, the central bank doesn’t think the economy is productive enough to sustain that pace without stoking inflation.

So if growth approaches the administration’s target — as it did this year, thanks to tax cuts and increased government spending — the Fed is likely to cautiously raise rates.

“Growth over the past year has been about 3 percent,” said Gus Faucher, chief economist at PNC Financial. “Most economists would argue that that’s above the economy’s long-run potential, that if you continue to see growth run at around 3 percent or so, you are going to get inflationary pressures building.”

Going too fast or too slow risks leading to a recession, something for which there is ample precedent: Of the 13 cycles of rate increases since World War II, 10 landed the economy in recession — underscoring the need for the Fed to pay close attention to new data.

The central bank is aiming to gently slow the expansion to a more sustainable level, closer to 2 percent, “so inflation doesn’t get out of hand,” Faucher added. “The Fed is focused on trying to achieve that soft landing and making sure we don’t get into a situation where the economy falls into recession.”

One of the main factors weighing on the long-term growth potential of the economy is the lack of gains in productivity, which can be boosted by making workers more efficient — such as through better education, better infrastructure or better technology. A more productive economy can yield bigger paychecks for workers that aren’t just a sign of inflation.

The tax law championed by Trump was designed in part to boost productivity by spurring more investment by businesses. Business investment did surge in the first half of 2018, but it slowed in the third quarter.

The president himself has undermined some of that effect through his trade policies, multiple economists said. Companies want more certainty on trade policy before committing to long-term investments, according to anecdotal evidence cited by the Fed.

“It most likely has had an impact on the willingness of companies to invest,” said Doug Duncan, chief economist at mortgage giant Fannie Mae. “That would actually probably tamp growth, but also investment is intended to increase productivity … so the trade thing is important in two ways.”

Markets will be watching closely to see if Fed officials lower their estimate this month to just two hikes in 2019 as the central bank eyes potential spillovers from Britain’s exit from the European Union, Italy’s budgetary troubles and China’s slowing expansion, on top of domestic headwinds like trade battles, a strong U.S. dollar and the potential for funding fights in Congress.

Powell also indicated last week that the Fed would be watching the impact of its own eight — likely soon to be nine — rate hikes since December 2015.

“We also know that the economic effects of our gradual rate increases are uncertain, and may take a year or more to be fully realized,” he said. “While [Fed officials’] projections are based on our best assessments of the outlook, there is no preset policy path.”