Frightened investors are piling their money into U.S. bonds for safety, governments are arranging huge bank bailouts and economies worldwide are slowing down.

These are worrisome echoes of the financial crisis that nearly sent the world into a depression four years ago.

But this time the perils are different — in ways that make the United States less vulnerable but make the task of calming financial markets and restoring economies to health more difficult.

In 2008, the financial crisis was centered in the United States, the result of a crash in housing prices and reckless financial practices that left the banking sector in danger of collapse.

This time, the crisis is rooted in Europe, largely the legacy of profligate spending by several euro-zone governments — though banking failures and tumbling real estate prices have played a role. The U.S. economy is mainly feeling the side effects of Europe’s troubles.

What’s more, the U.S. financial system is in much stronger shape than before.

But should things get worse, U.S. policymakers also have much less flexibility than they did four years ago. Congress is paralyzed by partisan differences. The Federal Reserve has shot many of its bullets. And President Obama cannot force Europeans to get their house in order.

The national debt is also much higher, meaning there is less latitude for government spending to boost economic growth. And there is less help available from emerging economies such as China and India, where growth has been slowing.

“The U.S. is more of an observer of the ongoing sovereign and banking crisis in Europe,” said longtime Fed economist Vincent Reinhart, now chief U.S. economist at Morgan Stanley. “This is just one long prize fight — and the U.S. government came out really swinging in 2008, but you lose stamina in Round 14 or 15.”

It took about a year for the financial crisis to build to a crescendo in the United States. But when it did, the problem was black-and-white. The U.S. banking system was near collapse, and the U.S. economy was in a tailspin.

The George W. Bush administration was largely free of political constraints with only months left in office and pressed a $700 billion plan to bail out banks. The Fed, accountable to virtually no one, dramatically lowered interest rates and poured boatloads of money into the financial system.

Then Obama, the new Democratic president, passed a massive stimulus through a Congress his party controlled.

But policymakers have much less room to act this time.

In trying to get Europeans to take the difficult steps to restore stability, Obama has only the power of persuasion — and it’s limited , given that the 17 nations that make up the euro zone are fighting over not just economics but also politics and values.

At home, Obama faces an economy that is growing and a financial system that is far stronger than it was in 2008, holding much more money in reserve to offset losses than it did four years ago. There’s no housing bubble; in fact, housing prices are bouncing along a bottom.

And sensing economic risks on the horizon, companies have been cautious about increasing hiring, keeping payrolls trim.

That means the U.S. economy is much better fortified against shocks than it was in 2008. But it’s still vulnerable, and government officials face far more constraints in trying to respond to economic threats.

Obama is caught between competing impulses. Seeking reelection, he wants to make clear that the economy, which is now as much a part of his record as his predecessor’s, is strong. But he is also trying to make the case that urgent new action to bolster growth is necessary.

The president proposed legislation in the fall that could accelerate economic growth and has been touting elements of it lately on the campaign trail. But Congress, where Republicans control the House, has not passed the measure.

There is now broad concern in Congress that new spending to help boost the economy would add to the nation’s debt, which is nearly 50 percent higher than it was in 2008.

Borrowing costs for the U.S. government remain extremely low because investors are so eager to lend it money by buying U.S. securities. But the government has not had much chance to take full advantage of these record-low rates, because Congress is blocking new stimulus spending.

The Fed is also more constrained than it was in 2008. Then, it could use its principal weapon — control of an interest rate that sets the benchmark for most banks — to encourage more lending and economic activity. It also has taken a range of unconventional actions to support growth. But the Fed’s benchmark interest rate is now near zero, and its tool kit is not as effective as before.

One of the most important changes from 2008 is that the major drags on the U.S. economy come from abroad.

The world’s four major developing countries — Brazil, Russia, India and China — have also showed signs of economic weakness recently. They are growing fast but slower than many economists anticipated.

In recent years, growth in emerging economies — especially China — helped get the world economy through the recession, and their demand for U.S. exports helped power the U.S. recovery. This time, it will be harder for developing economies to compensate for the decline in U.S. trade with Europe.

“With the U.S. growing at trend, Europe in a shallow recession, a more than minor slowdown in emerging markets would put the whole global enterprise at risk,” Reinhart said.

And in Europe, policymakers seem to be taking a two-steps-forward, one-step-back approach to dealing with their crisis.

This past weekend in Europe, for instance, after a long period of gamesmanship, Spain agreed to a $125 billion rescue of its banks by Germany and other nations, reducing fears that the continent’s fifth-largest economy could suffer a banking-sector collapse.

Yet this coming weekend, Greek voters might give power to a party that opposes taking part in the continent’s financial stability plan, potentially leading to a more serious phase of crisis if Greece then is forced to exit Europe’s economic union.

“It is a cycle that has become too familiar since the start of the crisis, like a movie we have watched too many times,” Christine Lagarde, managing director of the International Monetary Fund, said Friday. “With the passing of each cycle, we reach a higher and higher level of uncertainty, and the stakes rise.”