(Reuters) - Shares in drugmakers and U.S. health insurers rallied on Wednesday, after election results delivered a split Congress that is unlikely to significantly cut government healthcare programs or reduce drug prices in the world’s biggest and most profitable market.

FILE PHOTO: Fresenius Medical Care CEO Rice Powell addresses the company's annual news conference in Bad Homburg near Frankfurt, Germany, February 27, 2018. REUTERS/Ralph Orlowski

Republicans lost control of the House of Representatives to the Democrats in Tuesday’s elections, a setback for President Donald Trump, but increased their grip on the Senate, signaling likely policy gridlock in Washington.

While both parties agree on the need to bring down healthcare costs, they are deeply divided on how to go about it.

Analysts said a split Congress could benefit healthcare stocks, calling it a “best case scenario.”

“We expect to see legislative deadlock for the next two years, with an uptick in House hearings and political posturing while President Trump continues to push his agenda through executive action and the judiciary,” Leerink analyst Ana Gupte said.

Humana Inc HUM.N shares hit an all-time high of $354.33, while fellow health insurers UnitedHealth UNH.N and Anthem Inc ANTM.N also touched records.

Another attempt to repeal or replace former President Barack Obama’s signature Affordable Care Act (ACA) could now be off the table, according to Morgan Stanley analyst Zack Sopcak.

Shares of Molina Healthcare MOH.N and Centene Corp CNC.N, which have significant Obamacare business, were up more than 8 percent.

Voters in Idaho, Utah and Nebraska approved expansion of Medicaid programs for low-income people, helping shares of Medicaid-focused insurers like WellCare Health Plans WCG.N.

Collectively, the three states could add 150,000 to 200,000 new Medicaid-covered lives, said BMO analyst Matthew Borsch.

The U.S. healthcare sector .SPXHC was leading the rally on Wall Street, up 2.8 percent in midday trading.

Wall Street analysts had cautioned that a Democrat sweep of both the House and Senate could have sparked a sell-off in pharma, biotech and drug supply chain stocks, while full Republican control could have hurt health insurers that rely on Obamacare business.

Shares of German-based dialysis provider Fresenius Medical Care FMEG.DE and U.S. rival DaVita Inc DVA.N rose as California rejected a proposal that would have limited rates dialysis clinics can charge commercially insured patients.

Shares of U.S. drugmakers Pfizer PFE.N and AbbVie ABBV.N were up more than 3 percent, while Merck & Co MRK.N and Bristol-Myers Squibb <BMY.N, were up more than 2 percent. Shares of European drugmakers Sanofi SASY.PA, Roche ROG.S, AstraZeneca AZN.L and GlaxoSmithKline GSK.L also rose.

Kristina Hooper, chief global market strategist at Invesco in New York, said Republicans’ solidifying their hold on the Senate makes legislation to lower drug pricing less likely.

“I don’t see it getting through a Republican Senate,” she said.