Financial markets around the world stormed higher Friday after European leaders came up with a breakthrough plan to rescue banks, relieve debt-burdened governments and restore investor confidence.
The Dow Jones industrial average climbed 277 points, and the Standard & Poor’s 500 index had its best day of the year. Stocks advanced even further in Europe, in strong and weak countries alike.
The price of oil posted its biggest one-day increase in more than three years, and other commodities shot higher — signs of hope that a deal in Europe will remove a big barrier to a healthier world economy.
In Brussels, leaders of the 17 countries that use the euro appeared finally to have found a broad strategy to fight a debt crisis that has hounded European governments and world investors for three years.
The leaders agreed to pump money directly into stricken banks, let some countries tap into rescue money without submitting to stringent budget requirements and, later, tie European governments closer in economic union.
David Kelly, chief global strategist at JPMorgan Funds, said it was becoming clear that European leaders will compromise to solve the crisis. One of the biggest stock gains Friday came in Germany, which took a hard line in earlier negotiations.
‘‘The whole language is positive here,’’ he said. ‘‘Every time they’ve stared over the cliff into the abyss of a euro breakup, they’ve realized it’s much wiser to get closer together.’’
There was a sign immediately that Europe’s latest plan was working: The cost for the troubled government of Spain to borrow money on the bond market fell dramatically, by more than half a percentage point, to 6.34 percent.
Previous market rallies tied to progress in Europe have proved temporary. But for the day, at least, global stock markets were jubilant:
— In New York, the Dow Jones industrial average closed up 277.83 points, its second-best showing this year. The S&P 500 index soared 33 points, or 2.5 percent. The rally left the S&P a gain of 8.3 percent at the halfway mark for the year.
— The benchmark stock index in Germany rose 4.3 percent, by far its best performance this year. Germany has the biggest economy in Europe, and it depends heavily on exports, so it needs other countries to stay healthy.
— Stocks hit their highest level in two months in Italy and Spain, two of the countries with the shakiest finances. Stocks also neared a two-month high in Greece, another flashpoint of the debt crisis.
Traders sold U.S. Treasurys, sending the yield on the 10-year Treasury note up to 1.65 percent from 1.57 percent late Thursday, as demand decreased for ultra-safe investments and investors raised money to buy stocks.
Energy prices rose sharply because a cure for Europe’s debt problem would remove a big drag on global economic growth. The price of oil jumped $7.27 per barrel to $84.96. It was a gain of 9.4 percent, the biggest for oil since March 2009.
Seven of the 17 euro countries are in recession, and unemployment in euro countries is 11 percent. But if Europe gets its economy going, it will buy more goods and services from countries in Asia and the U.S.
Gold gained $54, the biggest jump since June 1, to $1,604 an ounce. Copper and silver both rose about 5 percent. Copper is a key material for economic expansion because of its use in electrical wiring, pipes and machinery.
The euro gained 2.3 cents against the dollar, to $1.2651.
On Thursday, economic reports from the United States were discouraging, and the Dow fell as much as 177 points. But stocks staged a big comeback late in the day and closed down modestly, partly because rumors swirled that European leaders were more conciliatory.
News of the deal in Europe broke overnight, and on Friday, stocks soared from the open. The Dow swung 430 points between its Thursday low and the high it reached late Friday.
Some market analysts remained cautious. Uri Landesman, president of Platinum Partners LLC, a New York hedge fund, said he expects more sharp leaps and dives this summer as traders speculate about Europe’s future.
‘‘This Europe thing is going to trade up and down based on the news of the day,’’ Landesman said.
Kelly took a brighter view. Besides the Europe deal, he referred to a Greek election this month won by parties that support a European bailout, and the Supreme Court’s decision Thursday to uphold most of President Barack Obama’s health care overhaul.
‘‘Uncertainty is diminishing,’’ he said. ‘‘These are all big question marks that have been out there, and as those question marks decrease, stock prices and interest rates increase.’’
As the first half of the year ends, there are still reasons to worry about the world economy: China’s expansion is slowing, and U.S. employers have created far fewer jobs in March, April and May than the three months before. A report next Friday is expected to show another month of anemic U.S. job growth.
Because of the economic fears and a deep slump in May as Spain’s banks teetered near collapse, the S&P 500 lost 3.3 percent for the quarter. But the S&P started the summer strong. It rose 4 percent in June, its best month since February and its strongest June since 1999.
For the year, the Dow is up 662.53 points, or 5.4 percent. The Nasdaq composite index is up 12.7 percent.
For the day, the Dow closed up 277.83 points, or 2.2 percent, at 12,880.09. The S&P 500 rose 33.12, or 2.5 percent, to 1,362.16. The Nasdaq rose 85.56, or 3 percent, to 2,935.05.
Industrial and information technology stocks rose the most of the 10 industry groups in the S&P 500. Those companies would benefit from faster growth and stronger demand from Europe, a key trading partner.
In corporate news, Research in Motion, maker of the BlackBerry, plunged $1.92, or 20.3 percent, to $7.54 after the company posted quarterly results that suggest it is crumbling faster than thought. RIM is cutting 5,000 jobs and unexpectedly delaying the launch of new phones deemed critical to its survival.
The biggest gainer in the S&P was the alcoholic beverage giant Constellation Brands. The stock jumped 24.4 percent, or $5.30, to $27.06. Constellation is buying the 50 percent of Crown Imports LLC that it doesn’t already own from Anheuser-Busch for $1.85 billion, giving it more U.S. control over Corona beers and other breweries.
Nike plunged $9.11, or 9.4 percent, to $87.78, the biggest drop in the S&P 500. The world’s largest athletic shoe and clothing company said profit dropped 8 percent last quarter on high product costs, a restructuring charge and an unexpected customs assessment.
Daniel Wagner can be reached at www.twitter.com/wagnerreports.