Stocks moved mostly lower on Thursday after the House passed a bill to repeal and replace the Affordable Care Act. 

The S&P 500 was down 0.01%, the Dow Jones Industrial Average slipped 0.12%, and the Nasdaq slid 0.01%.

The GOP achieved a narrow victory on Thursday afternoon after a House vote to pass an amended health care bill passed the necessary threshold. More than 216 House Republicans voted 'yes' on the Obamacare repeal-and-replace bill. The bill will now be placed on the Senate floor for a vote. The bill has not yet been evaluated by the Congressional Budget Office, meaning lawmakers do not know how much it will cost and how many people it could throw off of health insurance.

Industry leaders including GlaxoSmithKline (GSK) , AbbVie (ABBV) , Sanofi (SNY) , Gilead Sciences (GILD) , and Novo Nordisk (NVO) moved higher.

Crude oil held onto severe losses that put commodities at their worst levels in months. Crude oil prices were sharply lower on concerns over global oversupply. U.S. inventories fell at a smaller than expected pace in the past week, while U.S. oil production rose for its eleventh straight week. 

"Since the start of the year alone U.S. oil output has risen by 520,000 barrels per day," Fawad Razaqzada, technical analyst at FOREX.com, wrote in a note. "This was always going to happen after we had seen sharp and consistent increases in the rig counts as oil prices recovered. But inventories have started to fall back in the past several weeks. If the falls could be sustained, this could put a floor under slumping oil prices in the coming weeks."

Risks to Libyan production eased, threatening to destabilize the slow progress towards a global supply balance. Two of the largest factions in Libya have made progress toward a deal to resolve political unrest and economic conflicts, according to the BBC. Recent conflicts had caused shutdowns at several of Libya's largest oilfields. 

West Texas Intermediate crude fell 5% to $45.43 a barrel on Thursday, sliding below $46 for the first time since November 30.  

Energy shares were the worst performers on Thursday. Major oil producers including Exxon Mobil (XOM) , Chevron (CVX) , PetroChina (PTR) , Schlumberger (SLB)  and Petrobras  (PBR) were sharply lower on Thursday, while the Energy Select Sector SPDR ETF (XLE) fell 2.2%.

Tesla (TSLA) fell 5% after reporting a triple-digit increase in revenue, though a far wider quarterly loss than expected. The electric automaker reported a loss of $1.33 a share, far steeper than an anticipated loss of 81 cents a share. Revenue surged 134.8% to $2.7 billion, $90 million above consensus. Over the first quarter, Tesla made a record 25,051 deliveries. Tesla said initial production of its Model 3 was on track for July.

Facebook (FB) was also lower despite better-than-expected earnings over the quarter. Net income of $1.04 a share beat estimates by 17 cents thanks to strong ad sales growth and a steady increase in its active user base. Sales surged 49.3% to $8.03 billion, $200 million higher than anticipated. Ad revenue increased 51% to $7.86 billion, while monthly active users grew 18%.

Jim Cramer and the AAP team said Facebook has mastered how to advertise on mobile and social effectively and profitably while maintaining the incredible user experience. Find out more with a free trial subscription to Action Alerts PLUS.

Media stocks were sharply lower on Thursday after worrisome advertising trends from some of the industry's top companies. Viacom (VIAB) and AMC Networks (AMCX) each posted a drop in ad revenue over their recent quarter, a day after Time Warner (TWX) saw the same. Other media stocks in the red on Thursday included Comcast (CMCSA) , Twenty-First Century Fox (FOXA) , CBS (CBS) , and Walt Disney (DIS) . 

If you liked this article you might like

Kraft Heinz's New CFO Is Just 29

Why Apple Essentially Now Owns the Entire High-End Smartwatch Market

Arconic, Idexx Laboratories, AbbVie: 'Mad Money' Lightning Round

Don't Get Shaken Out of Good Stocks: Cramer's 'Mad Money' Recap (Wed 9/13/17)

Fitbit Gets Bounce From Bearish Apple Critics and Wall Street Ends at Records