WASHINGTON — The world economy looks well on its way to a year of faster, firmer growth after rising at its most rapid pace in two-and-a-half years in the second quarter.

The European Central Bank, is pictured in Frankfurt am Main, Germany, on April 27, 2017. / AFP PHOTO / Daniel ROLAND

Expansion is broad-based as long-time laggards Japan and the euro area perk up. Even more encouraging: the gains look sustainable since they’re not generating much in the way of inflation or other excesses that frequently presage a downturn, economists said.

“The global economy is in better shape than it has been in several years,” said Torsten Slok, chief international economist at Deutsche Bank AG in New York.

“We just don’t see what would be a trigger for a recession.”

He called it a “Goldilocks” scenario for stock market investors, with the economic recovery solid enough to generate higher corporate profits but not so fast as to lead to a rapid pickup in inflation and interest rates. The MSCI ACWI Index of stocks from emerging and advanced economies has risen in the past five quarters, its longest stretch of gains since the 2007-08 financial crisis.

Global gross domestic product is projected to increase by 3.4% in 2017 and 3.5% in 2018, according to the median forecast of economists surveyed by Bloomberg. While that would be a come down from an estimated 4%-plus pace in the second quarter, it would still represent a clear acceleration from last year’s 3.1% advance.

“Recent data point to the broadest synchronized upswing the world economy has experienced in the last decade,” International Monetary Fund chief economist Maurice Obstfeld wrote in a recent blog post.

“World trade growth has also picked up, with volumes projected to grow faster than global output in the next two years.”

The pick-up has been paced by budding rebounds in Europe and Japan, two economies that until now had been seen as drags on the global economy.

After years of lackluster growth, the euro-area economy is starting to build momentum. The expansion accelerated to 0.6% in the second quarter, and it’s more evenly spread across the 19-nation region than in the past. The Netherlands posted the strongest data in a decade and Italy, long an slouch in the region, may see the best performance since 2010 this year.

That’s good news for European Central Bank (ECB) President Mario Draghi, who wants to make sure the recovery is well established before reining in stimulus.

Inflation is still undershooting the ECB’s goal and there’s little sign of significant wage gains as yet.

That’s allowing Mr. Draghi to take his time in scaling back support for the region’s economy.

A four percent annualized surge in Japanese GDP in the second quarter put the nation in an unexpected spot: at the top of the growth table among the Group of Seven industrial economies.

The strongest domestic demand in years helped drive Japanese GDP to a sixth consecutive quarter of expansion, elevating hopes for a sustainable recovery in an economy that’s been better known in recent years for tepid inflation and a declining population than beating forecasts.

“We have just begun to see more convincing evidence that domestic demand is finally picking up,” Kathy Matsui, chief Japan strategist at Goldman Sachs Group Inc., said on Bloomberg Television.

While the unexpected strength in Europe and Japan is providing fuel for the global upswing, the expansion’s fate ultimately rests on the performance of the world’s two biggest economies, the United States and China.

And there the omens are favorable.

JPMorgan Chase & Co. this week raised its forecast for US growth in the third quarter to an annualized 2.25% from 1.75%. The move followed news of an unexpectedly strong rise in retail sales in July. GDP rose 2.6% in the second quarter.

Shoppers splurged at Internet retailers, department stores, restaurants and auto dealerships last month, boosting sales by 0.6%, the most this year.

“For the first time during this eight-year expansion there are no serious impediments to growth,” Mark Zandi, chief economist for Moody’s Analytics, wrote in his monthly economic report.

Consumers are benefiting from a strong jobs market and healthy balance sheets while companies are enjoying a revival in profits and rock-bottom borrowing costs, he said. At the same time, the risks to the US from abroad have diminished as world growth has strengthened.

Low inflation — it’s fallen short of forecasts for five straight months — means there’s little pressure on the Federal Reserve to act forcefully to rein in the recovery, even with unemployment at a 16-year low.

“The Fed has no reason in my view to act aggressively to tighten monetary policy,” William Dudley, president of the Federal Reserve Bank of New York, told the Associated Press in an Aug. 14 interview.

In China, a multi-year slowdown has stabilized, with economists forecasting an expansion of 6.7% this year. The IMF increased its estimate for the nation’s average annual growth rate through 2020 — to 6.4% from 6% — while warning that it would come at the cost of rising debt that increases medium-term risks to growth.

Of course, there’s always the chance that something could happen to upset the worldwide expansion, from an outbreak of hostilities between North Korea and the US to a sudden swoon in financial markets as central banks scale back their support.

Yet for now at least, the global economy is on a “positive trajectory,” said Bloomberg Intelligence Chief Economist Michael McDonough.

“There’s a pretty good foundation to build on for the next year or so.” — Bloomberg