Energy gains countered losses in the technology space on Wednesday, Sept. 20, balancing out markets and keeping stocks close to neutral.

The sector made gains even after another surge in oil stockpiles. Crude oil stockpiles ballooned again in the past week as the fallout from Hurricane Harvey continued.

U.S. crude inventories rose by 4.6 million barrels in the week ended Sept. 15, according to the Energy Information Administration. The previous two weeks have shown a large increase in stockpiles as Harvey crippled refinery production in the Texas and Louisiana region. Gasoline and distillates stocks declined.

West Texas Intermediate crude was up 1.5% to $50.23 a barrel on Wednesday.

Major oil producers such as Exxon Mobil Corp. (XOM) - Get Report , Chevron Corp. (CVX) - Get Report , ConocoPhillips (COP) - Get Report , Halliburton Co. (HAL) - Get Report  and Royal Dutch Shell PLC (RDS.A) were all higher on Wednesday. The Energy Select Sector SPDR ETF (XLE) - Get Report increased 0.6%. 

Don't miss these top stories on TheStreet: