The stock market closed with solid gains Wednesday, led by a jumps in health-care and energy companies. Drugmakers posted especially big gains. Energy stocks rose as the price of oil shot up 5 percent.

At the close, the Dow Jones industrial average was up to 112.7, about 0.6 percent, to 17,716.1. The Standard & Poor’s 500 index added 21.5 points, about 1.1 percent, to 2,066.7. The Nasdaq composite gained 76.8 points, about 1.6 percent, to 4,920.7.

advertisement | advertise on newsday

CRUDE ENERGY: About the same time, the price of U.S. benchmark crude oil was up $1.95, about 5.4 percent, at $37.84 a barrel on the New York Mercantile Exchange. In London, the price of the international benchmark oil, Brent crude, was up $1.89, about 5 percent, at $39.76 a barrel.

DRUG DEAL UNDONE: Health care stocks made the largest gains. Pfizer and Allergan both rose after they called off their $160 billion merger, as expected, after the U.S. Treasury Department introduced new tax rules that made the deal far less appealing. .

Biotechnology companies also rose. Cancer drugmaker Celgene closed up $6.10, about 6 percent, at $108.22, and Vertex Pharmaceuticals climbed $7.15, about 8.5 percent, to close at $91.31.

STELLAR SUDS: Constellation Brands rose $8.98, about 5.9 percent, to close at $160.34. The owner of Corona, Negra Modelo and Pacifico beers reported solid quarterly results and raised its profit forecasts for the year.