Aaron P. Bernstein/Reuters

Kansas became the 37th state to expand Medicaid under the Affordable Care Act, popularly known as Obamacare.

The agreement from Kansas Democratic Gov. Laura Kelly and a top Republican ended fighting in the state over its $3.8 billion Medicaid program.

The state's Medicaid expansion comes as the Affordable Care Act faces a prolonged legal battle that could end with its demise.

Visit Business Insider's homepage for more stories.

Kansas became the latest state to expand Medicaid on Thursday, making it the 37th state to do so under Obamacare even as the healthcare law still faces an existential court threat.

The Associated Press reported that Democratic Gov. Laura Kelly and state Senate Majority Leader Jim Denning agreed on a plan that would cover up to 150,000 more people, ending years-long political gridlock within the state over the $3.8 billion program.

The Kansas Legislature had previously passed a plan in 2017, but then-Republican governor Sam Brownback vetoed it.

But it's likely to become law this time, given that majorities of both Republicans and Democrats support expanding Medicaid in Kansas, according to the AP.

The deal comes as President Obama's signature healthcare law faces a prolonged legal battle that could stretch into the presidential race.

Last month, the Fifth Circuit Court of Appeals in New Orleans backed the ruling of a federal judge in Texas striking down a rule compelling people to have health insurance, but declined to say whether the rest of the law should be tossed out. The case was sent back to the same Texas judge.

Under Obamacare, or the Affordable Care Act, states were encouraged to expand their Medicaid programs and provide health insurance to more elderly, low-income, or disabled people. The federal government would pick up 90% of the tab, leaving states with a 10% share of the cost.

Only 14 states have chosen not to adopt it, many of them in Republican states. Florida and Texas are among them. But experts say it may be getting more difficult for hold-out states to disregard their large populations of uninsured people.

"It's getting harder for states to turn their backs on expanding Medicaid for low-income people with the federal government covering 90% of the cost. The symbolic barrier that it's part of 'Obamacare" is fading,' Kaiser Family Foundation health policy expert Larry Levitt said in a tweet. "But there are still big, stubborn holdouts."

Democrats are eager to keep the court case in the public eye, aware that healthcare remains a top issue among voters and helped them recapture the House of Representatives in the 2018 midterms.

Last week, a group of Democratic lawmakers filed a motion asking the Supreme Court to take up the case and quickly issue a ruling on the law's constitutionality ahead of the 2020 presidential election.

NOW WATCH: Extremists turned a frog meme into a hate symbol, but Hong Kong protesters revived it as an emblem of hope