U.S. stocks closed moderately higher Thursday as a sharp drop in oil prices countered a plummet in Merck & Co. (MRK) following negative legal news surrounding the drugmaker's Vioxx product.

The Dow Jones industrial average rose 7.84 points, or 0.07 percent, to end at 11,334.96, while the Standard & Poor's 500 Index gained 2.05 points, or 0.16 percent, to finish at 1,297.48. The Nasdaq Composite Index advanced 8.07 points, or 0.38 percent, to close at 2,157.61.

Click here to visit FOXBusiness.com's Investing Center.

Stocks have risen four days in a row, with back-to-back rallies Tuesday and Wednesday when tame inflation data supported the view that the Federal Reserve will not raise interest rates again in September.

Oil fell nearly $2 a barrel to just over $70 and lifted shares of industrial companies with a big appetite for energy, such as General Electric Co. (GE ) GE's stock rose 0.6 percent, or 21 cents, to $33.92 and ranked among the biggest positive influences on the S&P 500.

"Energy is going in our favor. It's breaking down," said Rick Campagna, portfolio manager with Provident Investment Council in Pasadena, California. "It feels like we will get inflation under control."

But shares of Merck fell 5.7 percent, or $2.35, to $38.83 on the New York Stock Exchange after the company suffered a double setback when a federal jury awarded $51 million to a former user of its withdrawn pain medicine Vioxx, and a New Jersey judge threw out a Vioxx verdict that had favored Merck, citing new evidence.

Merck was by far the biggest drag on the Dow and the S&P 500.

Blue-chip and tech stocks got a lift from Hewlett-Packard (HPQ ), a day after it beat Wall Street's profit estimates and announced a $6 billion share buyback.

HP's stock rose 2.1 percent, or 72 cents, to $35.15 on the NYSE and was the Dow's top gainer.

Shares of HP rival Dell Inc. (DELL ) fell 4 percent to $21.88 after the bell after the computer maker said the Securities and Exchange Commission had begun an informal probe of Dell's accounting practices. Dell, the world's largest personal computer maker, also reported a sharp drop in quarterly profit after the regular trading session ended. Shares of Dell closed on Nasdaq at $22.80, up 0.3 percent, or 7 cents.

U.S. crude oil futures for September delivery slid $1.83 to settle at $70.06 a barrel on the New York Mercantile Exchange, down for the fourth straight session, as ample U.S. fuel stockpiles eased fears of supply shortages.

The cease-fire between Israel and Lebanese Hezbollah guerrillas and BP's decision to shut only half of its 400,000 barrel-per-day Prudhoe Bay oil field in Alaska continued to cut down supply risk premium, analysts said.

Volume on the NYSE was fairly active, with 1.57 billion shares changing hands, below last year's daily average of 1.61 billion shares. On Nasdaq, about 1.97 billion shares traded, above last year's daily average of 1.80 billion.

Advancers outnumbered decliners by a ratio of about 6 to 5 on the NYSE, while on Nasdaq, about six stocks rose for every four that fell.

Click here to visit FOXBusiness.com's Investing Center.