The sector was up nearly 2% as a whole by Wednesday's closing bell with integrated oil majors Chevron (CVX) and ExxonMobil (XOM) both up about 0.5%, and oil and natural gas production companies up more than 2% on average, according to Factset.
The rally comes as the U.S. Energy Information Administration reported U.S. crude oil stockpiles fell by 5.2 million barrels in the week ended Oct. 14.
The larger-than-expected inventory drop sent West Texas Intermediate crude futures to a one-year high of $51.89 on Wednesday afternoon.
WTI crude contracts for November delivery were trading up about 2.2% at $51.41 by market close Wednesday. Global benchmark Brent crude contracts were also up about 1.7% to $52.55 around 4 p.m.
In contrast, independent oil and petroleum product refiners were slumping Wednesday afternoon as the EIA reported total motor gasoline inventories increased by 2.5 million barrels week-over-week.
Warren Buffett-darling Phillips 66 (PSX) was the only refiner in the green in the S&P 500 by Wednesday's close, up a fraction of a percent.
Meanwhile, an unexpected third quarter profit reported Wednesday by oilfield services provider Halliburton (HAL) brought its stock up more than 4% and with it the company's respective sector.
With the help of solid energy and industrial sector performances, the S&P 500 index finished Wednesday trading up 0.22%.