Stocks climbed Wednesday as investors clung to hope for an international deal to stem a global glut in crude oil with production cutbacks. That sent the price of oil sharply higher, as well as the stocks of major energy companies.

At the close on Wall, the Dow Jones industrial average was up 257.4 points, about 1.6 percent, at 16,453.8. The Standard & Poor’s 500 index gained 31.2 points, about 1.7 percent, to 1,926.8. The Nasdaq composite climbed 98.1 points, about 2.2 percent, to 4,453.

advertisement | advertise on newsday

As markets closed, the price of U.S. benchmark crude oil had jumped $1.53, about 5.3 percent, to $30.57 a barrel in trading on the New York Mercantile Exchange. Brent crude, the international benchmark that is traded in London, gained $2.77, about 8.6 percent, at $34.95 a barrel.

The price of oil recovered as investors again hoped for an international deal that will cap or cut production. Several members of the Organization of Petroleum Exporting Countries are in talks about freezing production at January’s levels, but that deal requires all of OPEC’s members to agree, and Iran said Wednesday that it won’t stop increasing its exports. Still, investors appeared to be encouraged that the countries are talking.