NEW YORK (Reuters) - U.S. healthcare stocks posted sharp gains on Thursday, with hospitals and insurers climbing after Senate Republicans released a draft bill to replace Obamacare, while a recent surge in biotechnology shares showed no signs of slowing.

Traders work on the floor of the New York Stock Exchange (NYSE) in New York City, NY, U.S. May 18, 2017. REUTERS/Brendan McDermid

The S&P 500 healthcare sector was up 1.2 percent, hitting a record high during the session. The sector easily topped other major groups on Thursday and has gained about 4 percent this week.

Shares of hospitals and health insurers, the main focus of investors during Republican efforts to dismantle the Affordable Care Act, known as Obamacare, were higher after the release of the proposed legislation in the Republican-controlled Senate.

“The initial proposal I think is more generous and more positive to the industry than expected,” said Jeff Jonas, portfolio manager with Gabelli Funds.

Favorable elements in the bill, according to analysts, included the elimination of taxes on industry and provisions to stabilize the insurance exchanges set up under former President Barack Obama’s 2010 healthcare law.

A delayed rollback of the expansion of Medicaid, the government insurance program for low-income Americans, also was seen as a positive move.

A version of the bill passed the House of Representatives, where Republicans also have a majority, last month.

Hospitals, in particular, have benefited from Obamacare’s coverage expansion. HCA Healthcare Inc rose 3 percent, while Tenet Healthcare Corp surged 7 percent.

Among large insurers, Aetna rose 0.7 percent and UnitedHealth Group gained 0.9 percent. Insurers that specialize in Medicaid also gained, with Centene up 3 percent and Molina Healthcare rising 2.6 percent.

“We see the draft version of the Senate bill as better than expected and driving the out-performance particularly in our facilities coverage and also for our managed care names,” Leerink analyst Ana Gupte said in a research note.

Biotech stocks continued to fuel the sector. The Nasdaq Biotechnology index rose 1.1 percent on Thursday for a gain of more than 9 percent for the week.

Biotech appeared to be benefiting from recent reports suggesting efforts by the Trump administration to rein in drug prices would be not be as harsh on the industry as feared.

“There was very little that directly threatened the industry price structure,” said John Schroer, U.S. healthcare sector head for Allianz Global Investors in San Francisco. “I think that gave investors also a bit of comfort that we would not see something draconian.”

For 2017, the healthcare sector has climbed 17 percent, against a 9 percent gain for the S&P 500, trailing only technology’s 19 percent rise among major groups.

“After the initial strong start to the year that healthcare experienced, it has generally lagged other areas of the market,” Schroer said.

“Now healthcare is taking on more of a leadership role.”