(Reuters) - Wall Street ended flat on Thursday as a steep fall for the energy sector countered some solid earnings reports, with major stock indexes closing little changed after the U.S. House of Representatives passed a healthcare overhaul.

The House on Thursday afternoon narrowly voted to repeal major portions of the 2010 Affordable Care Act, known as Obamacare, and replace it with a Republican healthcare plan, sending it to the Senate for consideration.

The bill’s passage comes after House Republicans pulled healthcare legislation earlier this year in a setback, raising questions among investors about President Donald Trump’s ability to enact his agenda.

The benchmark S&P 500 has gained 11.7 percent since Trump’s election, fueled by his plans for tax cuts, infrastructure spending and deregulation.

“The real risk in the near term to the so-called Trump rally was a failure to pass it,” said Rick Meckler, president of LibertyView Capital Management in Jersey City, New Jersey.

“I don’t know if this market is really that focused on healthcare as the big issue,” Meckler said. “I think they’re really focused on the tax plan. If they couldn’t pass the healthcare, it would bode very poorly for the tax plan.”

The Dow Jones Industrial Average fell 6.43 points, or 0.03 percent, to 20,951.47, the S&P 500 gained 1.39 points, or 0.06 percent, to 2,389.52 and the Nasdaq Composite added 2.79 points, or 0.05 percent, to 6,075.34.

The energy sector dropped 1.9 percent, easily the worst performing group. Exxon Mobil’s 1.3-percent decline and Chevron’s 1.8-percent drop weighed on the S&P.

Oil prices tumbled about 5 percent on signs that OPEC and other producing countries would not take more drastic steps to reduce the world’s stubbornly persistent glut of crude.

Investors also were digesting the Federal Reserve’s statement on Wednesday. The central bank left rates unchanged but downplayed weak first-quarter economic growth while emphasizing the strong labor market, in a sign it was still on track for two more rate rises this year.

Focus was turning to Friday’s U.S. employment report as the next gauge of the economy and labor market. Data on Thursday showed new applications for U.S. jobless benefits fell sharply last week and the number of Americans on unemployment rolls hit a 17-year low.

“It’s going to be particularly important to see if we get the expected rebound in job gains,” given that the Fed discounted the first quarter growth weakness because of a projected recovery, said Alan Gayle, director of asset allocation at RidgeWorth Investments in Atlanta.

“Now the market is going to be watching very carefully to see whether or not they get that confirming data that would mean we will get a June rate increase,” Gayle said.

Slideshow ( 5 images )

In corporate news, Tesla fell 5 percent after the electric automaker’s quarterly net loss widened.

In the healthcare sector, Regeneron rose 6.7 percent and Zoetis rose 5.9 percent after their respective results.

Earnings season has come in generally above expectations, encouraging investors. First-quarter profits at S&P 500 companies are estimated to have increased 14.8 percent, the strongest since 2011, according to Thomson Reuters I/B/E/S.

Slideshow ( 5 images )

Declining issues outnumbered advancing ones on the NYSE by a 1.79-to-1 ratio; on Nasdaq, a 1.17-to-1 ratio favored decliners.

The S&P 500 posted 49 new 52-week highs and 13 new lows; the Nasdaq Composite recorded 104 new highs and 77 new lows.

About 7.8 billion shares changed hands in U.S. exchanges, well above the 6.6 billion daily average over the last 20 sessions.