WASHINGTON — After galloping along for the past two years, the global economy is showing signs of weakening, with the United States, China and Europe all facing the rising threat of a slowdown.

Few economists foresee an outright global recession within the next year. But the synchronized growth that powered most major economies since 2017 appears to be fading. The risks have been magnified by the trade war raging between the United States and China, the strife dividing Britain over an exit from the European Union and the Federal Reserve's continuing interest rate hikes.

It's all been enough to contribute to a broad retreat in global stock markets. Counting Tuesday's deep losses, U.S. stock indexes, once up around 10 percent for the year, have surrendered all their 2018 gains.

The Fed is expected next month to raise its key short-term rate for the fourth time this year. The central bank's rate hikes help control inflation. But they also make loans costlier for consumers and businesses. And for countries that borrowed in U.S. dollars, the Fed's hikes make debts harder to bear. Argentina, for one, has slid into recession as its cost of repaying its debt has surged.

"We can't continue to grow this fast for much longer without risking inflation," Adrian Cooper, chief executive of Oxford Economics, said of the still-solid U.S. economy. "That's ultimately what the Fed is trying to achieve with its steady movement in interest rates. The skill is to do so in ways that don't create a big downturn."

The concerns have grown enough that Larry Kudlow, President Donald Trump's top economic adviser, on Tuesday dismissed the worries roiling the markets.

"Recession is so far in the distance I can't see it," Kudlow told a group of reporters outside the White House. "Keep the faith. It's a very strong economy."

The collective growth of the world's major economies in the past two years was broadly welcomed after a feeble recovery from the 2008 financial crises. Yet few economists saw accelerated growth as sustainable — or even desirable — over several years.

The concern is that a prolonged global expansion could ignite inflation or speculative investing that would inevitably send vulnerable economies into a downturn. Compounding the challenge, the world's economies are linked more than ever through trade, finance and investment — to the point that a rupture in one major nation tends to spread across the globe.

Oxford Economics predicts that the growth of the global economy, as measured by its gross domestic product, will slip from 3.1 percent this year to 2.8 in 2019. Such a slowdown is enough to crimp corporate profits and business investment, Cooper said. Still, most American and European workers probably wouldn't feel the pain, he said, in part because of a resilient job market and lower oil prices.

"2019 is still going to look pretty good — your job is going to be safe, and your wages are going to rise," Cooper predicted while adding that he thinks the slowdown will worsen in 2020.