In the closing days of their legislative sessions, lawmakers in more than a dozen states are struggling with whether to expand Medicaid under the federal health-care law, with many of them leaning against participating in a program that is key to President Obama’s aim of extending coverage to 30 million uninsured Americans.

Twenty states and the District of Columbia have signed on to the expansion, and 14 are planning to decline. But 16 remain in limbo as lawmakers clash in the final days and weeks of the legislative calendar, when many must come to a decision in time for the provision to kick in next year.

The uncertainty comes at a moment of intense scrutiny of the way the administration has handled the rollout of the health-care law, with states at vastly different stages of implementation and the public confused about how the law will work. Obama offered reassurances this week, saying that “what we’re doing is making sure that every single day we are constantly trying to hit our marks so that it will be in place.”

The three-year-old health-care law faces perhaps its greatest challenge this fall: enrolling millions of Americans in health insurance beginning Oct. 1.

Much has been left up to the states, which have taken up the law with varying levels of enthusiasm. More than half have decided not to set up the online marketplaces meant to help people find insurance and financial assistance, leaving the enormous task to the federal government.

State commitment to expand Medicaid eligibility, as of May 2.

Many states are also wary of the expense of adopting the law’s enlargement of the pool of people eligible for Medicaid, the government health insurance program for the poor, even though the federal government will pay the full cost of the new enrollees for three years and the bulk of the cost thereafter.

The debate has created some unusual battle lines. In Florida, Ohio, Arizona and Michigan, GOP governors wary of turning down billions of federal dollars have met with stalwart opposition from fellow Republicans in the legislatures. The most closely watched of those states is Florida, where an estimated 1.2 million people stand to gain coverage under the provision.

With the Florida legislative session slated to end Friday, prospects for the Medicaid expansion appear dim. But in a victory for the Obama administration Thursday, West Virginia Gov. Earl Ray Tomblin (D) announced that his state would participate. His decision is expected to make an additional 91,500 people eligible for Medicaid there.

In many states, health-care advocates have allied with business groups and hospitals to endorse expansion. But they have been stymied by conservative groups and the tea party, which are using the Medicaid fight to make a last stand against a health-care law they have battled for more than three years.

“We promised these legislators that if they voted to accept money from the federal government takeover of health care in our state that we would do all we could to replace them,” said Ted Stevenot, president of the Ohio Liberty Coalition.

Stevenot’s group went door-to-door, collecting Republican signatures in individual legislative districts to prove to lawmakers that their reelection efforts would be thwarted if they voted for the expansion. Their efforts appear to be paying off; the Ohio General Assembly last month rejected Republican Gov. John Kasich’s budget line item that would have allowed Ohio to accept the money. Democrats are hoping to bring the issue back for an up-or-down vote before the session ends this summer.

But there is passion on the other side as well. Hospitals have been among the most vocal supporters of expansion because the health-care law will reduce the payments they receive to treat uninsured patients — the expectation is that most of those patients would have health-care coverage. Many fear financial ruin without the Medicaid expansion.

Business groups say the huge influx of federal money would be a financial windfall for the states. And health-care advocates point out that, in states that choose not to expand, the people left out will probably be fast-food employees, grocery store cashiers, construction workers and other very-low-wage earners — millions of people who were supposed to be some of the prime beneficiaries of reform.

Because of a quirk of the law, they would neither be eligible for Medicaid nor qualify for federal subsidies to buy private insurance.

“If we don’t expand, we will cement our position as last on every health indicator,” said Roy Mitchell, executive director of the Mississippi Health Advocacy Program. He said 300,000 low-income people in the state would get coverage under the proposal. “Mississippi may not see the vision of health-care reform realized.”

Democrats and Republicans in Mississippi are at a stalemate over the expansion, which Gov. Phil Bryant (R) opposes. Democrats tried to force their hand by blocking the reauthorization of Medicaid even at its current levels. The issue will have to be hammered out at a special session later this year to avoid affecting more than 600,000 current Medicaid recipients.

While some states that are leaning against expansion are holding special sessions to consider their options, others are looking at a compromise measure that would allow them to use the federal dollars to buy people private insurance, an idea pioneered by Arkansas.

The issue remains open virtually everywhere, partly because there is no firm deadline to opt in or out, but also because of the huge sums of money at stake. The Obama administration has devoted half a trillion dollars over 10 years to pay for the expansion, and many states have commissioned studies that show the money would be a boon to the local economy.

“This year I have been very cautious to say of any state, ‘This is off the table,’ ” said Nicole Kaeding, state policy manager for Americans for Prosperity, a conservative political advocacy group that has been lobbying states to reject expansion. “It’s always tempting to look at the promises of federal funding. These are some pretty big incentives.”

Medicaid is funded jointly by the federal government and the states. In most states, it is available only to children, pregnant women and extremely impoverished adults, but the law will allow states to include anyone making up to 138 percent of the poverty level, or $26,951 for a family of three in 2013 dollars.

Altogether, the states that have decided to expand Medicaid would add nearly 5 million people to the rolls, based on figures collected by the Urban Institute, though critics say the number could be much higher.

The Obama administration had intended for the expansion to be mandatory. But the Supreme Court ruled last year that states could opt out, leading many Republican governors to do so. The governors, including Texas’s Rick Perry and Louisiana’s Bobby Jindal, have opposed the expansion as an outgrowth of their objections to the law as a whole. They are against the idea of expanding a government entitlement program that they say is ineffective, encourages dependency and contributes to the national debt.

And many Republicans argue there is no guarantee the government will fulfill its promise to pay for most of the expansion. They say states could get stuck with the enormous bill — or face the politically fraught possibility of kicking people off the rolls.