WASHINGTON (AP) — Senate Republicans launched their plan for shriveling Barack Obama’s health care law Thursday, edging a step closer to their dream of repeal with a bill that would slice and reshape Medicaid for the poor, relax rules on insurers and end tax increases on higher earners that have helped finance expanded coverage for millions.

Four conservative GOP senators quickly announced initial opposition to the measure and others were evasive, raising the specter of a jarring rejection by the Republican-controlled body. But Senate Majority Leader Mitch McConnell, R-Ky., indicated he was open to discussion and seemed determined to muscle the measure through his chamber next week.

Release of the 142-page proposal ended the long wait for one of the most closely guarded bills in years. McConnell stitched it together behind closed doors, potentially moving President Donald Trump and the GOP toward achieving perhaps their fondest goal — repealing former President Obama’s 2010 statute, his proudest domestic legacy.

On Twitter, Trump said he was “very supportive” of the bill. On Facebook, Obama said at the heart of the bill was “fundamental meanness.”

The bill would end Obama’s tax penalties on people who don’t buy insurance — effectively ending the so-called individual mandate — and on larger companies that don’t offer coverage to their workers. It would offer less generous subsidies for people than Obama’s law but provide billions to states and insurance companies to buttress markets that in some areas have been abandoned by insurers.

McConnell must navigate a narrow route in which defections by just three of the 52 Republican senators would doom the legislation. He and others said the measure would make health insurance more affordable and eliminate Obama coverage requirements that some people find onerous.

“We have to act,” McConnell said. “Because Obamacare is a direct attack on the middle class, and American families deserve better than its failing status quo.”

Democrats said the measure would result in skimpier policies and higher out-of-pocket costs for many and erode gains made under Obama that saw roughly 20 million additional Americans gain coverage.

“We live in the wealthiest country on earth. Surely we can do better than what the Republican health care bill promises,” said Senate Minority Leader Chuck Schumer, D-N.Y.

Four conservative senators expressed opposition but openness to talks: Ted Cruz of Texas, Kentucky’s Rand Paul, Mike Lee of Utah and Ron Johnson from Wisconsin. They said the measure falls short, missing “the most important promise that we made to Americans: to repeal Obamacare and lower their health care costs.”

On the other hand, Sens. Dean Heller of Nevada, facing a competitive 2018 re-election battle, Ohio’s Rob Portman and Shelley Moore Capito of West Virginia expressed concerns about the bill’s cuts to Medicaid and drug addiction efforts. And Susan Collins of Maine reiterated her opposition to language blocking federal money for Planned Parenthood, which many Republicans oppose because it provides abortions.

Late Thursday, Trump tweeted, “I am very supportive of the Senate #HealthcareBill. Look forward to making it really special! Remember, ObamaCare is dead.”

In an interview later with Fox News Channel, Trump was asked about the four conservatives opposing the bill. “Well, they’re also four good guys, four friends of mine and I think that they’ll probably get there,” he said. “We’ll have to see.”

Obama was more than skeptical.

“If there’s a chance you might get sick, get old or start a family, this bill will do you harm,” he wrote. He said “small tweaks” during the upcoming debate “cannot change the fundamental meanness at the core of this legislation.”

The House approved its version of the bill last month. Though Trump lauded its passage in a Rose Garden ceremony, he called the House measure “mean” last week.

The nonpartisan Congressional Budget Office said under the House bill, 23 million fewer people would have coverage by 2026. The budget office analysis of the Senate measure is expected early next week.

The Senate legislation drew support from the U.S. Chamber of Commerce, which said it would “stabilize crumbling insurance markets” and curb premium increases. The American Medical Association, the American Hospital Association and AARP, representing older people, all criticized the measure.

The Senate bill would phase out extra money Obama’s law provides to 31 states that agreed to expand coverage under the federal-state Medicaid program. Those additional funds would continue through 2020, then gradually fall and disappear entirely in 2024.

Ending Obama’s expansion has caused major rifts among GOP senators. Some from states that have expanded have battled to delay the phase-out, while conservative Republicans have sought to halt the funds quickly.

Beginning in 2020, the Senate measure would also limit the federal funds states get each year for Medicaid. The program currently gives states all the money needed to cover eligible recipients and procedures.

The Senate bill largely uses people’s incomes as the yardstick for helping those without workplace coverage to buy private insurance. That would focus the aid more on people with lower incomes than the House legislation, which bases its subsidies on age.

Caroline Pearson, a senior vice president of the consulting firm Avalare Health, said the Senate subsidies would be smaller than Obama’s because they’re keyed to the cost of a bare-bones plan and because additional help now provided for deductibles and copayments would eventually be discontinued.

The bill would let states get waivers to ignore some coverage requirements under Obama’s law, such as specific health services insurers must now cover.

States could not get exemptions to Obama’s prohibition against charging higher premiums for some people with pre-existing medical conditions, but the subsidies would be lower, making coverage less affordable, Pearson said. States would also have to retain Obama’s requirement that family insurance cover children up to age 26.

Tax boosts Obama levied on upper income people and medical industry companies would be repealed, and another on costly employer-provided health insurance would be delayed.

The bill would bar using tax credits to buy coverage that includes abortions. That language could be forced out of the bill for procedural reasons, which would threaten support from conservatives, but Republicans would seek other ways to retain the restriction.

For the next two years, the Senate would also provide money that insurers use to help lower out-of-pocket costs for millions of lower income people. Trump has been threatening to discontinue those payments, and some insurance companies have cited uncertainty as a reason they are abandoning some markets and boosting premiums.WHAT OTHERS ARE CLICKING ON:

>> MORE TOP STORIES