CLEVELAND (Reuters) - Ohio’s Republican-controlled legislature voted on Wednesday to freeze enrollment in the state’s Medicaid healthcare insurance for the poor, setting the stage for a showdown with Republican Governor John Kasich, who favors expanding the program.

The proposed Medicaid freeze, which would deny coverage to hundreds of thousands of Ohio residents who lack job-related health insurance and cannot afford to purchase their own, was adopted as part of a $65 billion two-year budget plan.

The measure, approved by mostly party-line votes in both chambers of the state Legislature, would prohibit enrollment of new Medicaid recipients, or re-enrollment of lapsed beneficiaries, after July 2018.

Republicans, especially hard-line conservatives, say the Medicaid freeze is needed to help reduce costs.

Democrats say halting the Medicaid expansion, begun in Ohio under the 2010 federal Affordable Care Act, would leave the state’s neediest residents without coverage and ultimately raise healthcare costs for everyone.

Kasich, a moderate Republican who sought the 2016 Republican presidential nomination and has been a vocal supporter of Medicaid expansion, could use a line-item veto against the freeze while he considers signing the broader budget legislation before a Friday deadline, his office said.

Republican lawmakers could then attempt to muster enough votes to override Kasich’s veto, although Kathleen Clyde, a Democrat in the state’s House of Representatives, said on Wednesday she doubted whether there were enough votes to override a Kasich veto.

“Instead of providing a path to the middle class for those struggling with underemployment, drug addiction and low wages, Republican leaders are gutting Medicaid, threatening healthcare access to over 700,000 Ohioans,” Clyde said in a statement after the vote.

Ohio is among more than 20 U.S. states that have expanded Medicaid enrollment under the Affordable Care Act, also known as Obamacare, largely with funding through federal dollars, according to the National Conference of State Legislatures.

Congressional Republicans in Washington have sought for years to repeal the law, and Kasich has been a vocal critic of legislation passed by the U.S. House of Representatives and a similar bill awaiting a vote in the Senate that would dismantle Obamacare.

The U.S. Congressional Budget Office, a nonpartisan office, said this week that 22 million Americans would lose insurance over the next decade under the U.S. Senate Republican healthcare bill. Insurance losses are expected to grow beyond 22 million due to deep cuts to the Medicaid insurance program that are not scheduled to go into effect until 2025.

Kasich told the New York Times earlier this month he could accept a gradual phase-out of expanded Medicaid if Congress provided states with more money than the House-passed healthcare bill would furnish with more flexibility for the state to manage its own program.