) -- Crude prices rose 1% Tuesday and energy-related equities joined the basic materials stocks to turn the market around late in the session.

Despite struggling under the weight of underwhelming earnings results for most of Tuesday's trading session, shares throughout the

energy and basic materials sectors pulled higher in the last stretch of trading, helping stocks close roughly 1% higher.



report credited a tropical storm threat as being partially responsible for stronger oil prices on Tuesday.

Surprise revenue misses from


(IBM) - Get Report


Goldman Sachs

(GS) - Get Report

in addition to another round of

disappointing housing sector news pressured shares and energy prices throughout the morning.

Oil prices, however, turned higher by mid-morning as stocks came off of earlier lows. The August delivery contract on the Nymex, which expires today, gained 90 cents, or 1.2%, to settle at $77.44 a barrel. The more actively traded September delivery contract added 68 cents, or 0.9%, to settle at $77.58 a barrel.

"If anything, this looks more like a short-covering rally," said Schork Group analyst Hamza Khan, who noted a similar trend on the expiration of the July contract. "Without the August contract coming off the board, we probably wouldn't be up today."

The move higher in crude prices came ahead of the latest weekly inventory figures, which weren't as bullish as analysts had been anticipating. Late Tuesday, the American Petroleum Institute said crude oil inventories shed 241,000 barrels in the week ended July 16 -- a much milder decline than the 1.6 million-barrel drawdown that analysts polled by Platts had expected.

On Wednesday at 10:30 a.m. ET the Energy Information Administration will release its own weekly stockpile statistics.

By the end of Tuesday's session,


(CVX) - Get Report

was among the

Dow Jones Industrial Average's

top 10 performers as the stock finished with 1.5% gains at $73.10. Rival component

Exxon Mobil

(XOM) - Get Report

rose 0.9%, to $58.95. The Dow, meanwhile, added 76 points, or 0.7%, to close at 10,230. The NYSE Arca Oil index jumped 1.2% higher.

The service segment also saw a swift move up as the Philadelphia Oil Service Sector index surged 3.4%. Better-than-expected second-quarter earnings and sales from oil and natural gas servicer

Weatherford International

(WFT) - Get Report

had helped the sector hold milder gains earlier in the session. Weatherford's stock finished 3.3% higher at $15.56.

Shares of


(BP) - Get Report

continued to weaken Tuesday despite the British prime minister's trip to Washington, during which he acknowledged the U.S.' anger over BP's Gulf of Mexico oil spill. BP's stock finished the session 1.5% lower at $35.20.

Elsewhere on the Nymex, the August natural gas contract gained 8 cents, or 1.8%, to settle at $4.59 per million British thermal units. The September heating oil contract advanced by 1 cent, or 0.5%, to settle at $2.05 a gallon, and September gasoline increased by 2 cents, or 0.9%, to settle at $2.08 a gallon.

--Written by Sung Moss and Melinda Peer in New York