Ohio, a red-leaning presidential battleground state, is opposing a lawsuit President Trump backs that would invalidate Obamacare, signaling the difficulty he faces trying to resurrect the issue for the campaign.

Ohio Attorney General Dave Yost, a Republican, says the lawsuit's success would do unacceptable harm to his state.

“We’ve got 1.9 million, nonelderly Ohioans who have preexisting conditions. If this exercise in judicial activism in Texas holds, it’s going to impact my state. Those people are going to be left without insurance coverage for those preexisting conditions,” Yost told the Washington Examiner. “The way I explain this to people is, we’ve got a tumor, the patient has a tumor, you cut out the tumor; you don’t kill the patient.”

Trump, who won Ohio in 2016 and can't afford to lose it in 2020, is framing his reelection partly as a referendum on the Affordable Care Act. The law was signed by President Barack Obama nine years ago after clearing Congress without a single GOP vote.

A group of Republican-led states, represented chiefly by Texas Attorney General Ken Paxton, sued last year in federal district court and won a ruling that the mandate to purchase health insurance was unconstitutional and that, therefore, the entire Affordable Care Act should be struck down. The law has remained in place pending appeals. If the Supreme Court weighs in, that might not happen until after the 2020 election.

Republicans in Congress have effectively abandoned attempts to repeal Obamacare. Their position against it helped forfeit Republican seats in a midterm election that cost them their House majority. Fearing another backlash, they told Trump they would not consider legislation to repeal Obamacare before the next election. Instead, Republicans are focused on defending the popular components of the law.

[Read more: Trump: GOP 'will be the party of great healthcare']

That is what Yost is doing.

Yost, 62, was elected attorney general last year in a midterm election that was less severe for Republicans in Ohio than elsewhere. But even in a state that is mostly friendly to Trump, Yost has declined to sign onto the lawsuit to throw out Obamacare that the president is essentially running on in 2020. Rather, Yost has filed an amicus brief against the lawsuit. It is a prime example of how the politics of Obamacare have changed.

Yost, conceding that “not everybody’s happy” with his decision to break with Trump, emphasized that Ohio would not join the countersuit brought by a coalition of Democratic-led states. Additionally, the attorney general agrees with the part of the challenge spearheaded by Texas that argued that the individual mandate to purchase insurance is unconstitutional, but not that its unconstitutionality disallowed the entire law.

“There’s a broad support for leaving your kids on your insurance until you’re 26, there’s abroad support for protection against pre-existing conditions,” he said. “I haven’t joined the Democrats’ [countersuit]. But I don’t agree with [a lot of] Republicans, either.”