National Republicans may have shot themselves in the foot with their latest legal battle against the Affordable Care Act.

The Department of Justice said this week it mostly agrees with a lawsuit filed by 20 Republican states leaders that claims the ACA's individual mandate is unconstitutional since the GOP zeroed out its penalty last year. The Trump administration also said that pre-existing condition protections within the law were inseparable from the mandate and must be struck down as well.

"The Department in the past has declined to defend a statute in cases in which the President has concluded that the statute is unconstitutional and made manifest that it should not be defended, as is the case here," Attorney General Jeff Sessions, said in a letter.

Digital Transformation Unlock the Digital Front Door with an App The Member Mobile App is the smarter and better way to engage members anytime and anywhere. Members can find the right doctors, receive alerts, track spending, use telehealth, and more — all within a guided, intuitive, and seamless experience. Built exclusively for payers, it is ready to install and launch in a few months. Request a consult on how to enable the digital front door with the Mobile App, today. Request a Consult

Such protections prevent insurance companies from denying coverage or charging higher rates to people with pre-existing conditions. "Removing those provisions will result in renewed uncertainty in the individual market, create a patchwork of requirements in the states, cause rates to go even higher for older Americans and sicker patients," America's Health Insurance Plans, said in a statement to FierceHealthcare.

Seventeen Democratic state attorneys general have joined the suit to defend the ACA, and the GOP's bid is considered a long shot that could end up hurting the party more than it helps.

Aggregate polling finds the entire 2010 law is generally supported by the public, and, more specifically, about 77% of Americans say it is "very important" that people with pre-existing conditions buy insurance at the same price as others, according to USA TODAY and Suffolk University. Additionally, voters have consistently ranked healthcare as their top issue for the upcoming midterm elections.

RELATED: "Graham-Cassidy 2.0" could be coming this summer

Two of the Republican attorneys general on the lawsuit, Patrick Morrisey of West Virginia and Josh Hawley of Missouri, are running for hotly contested Senate races later this year. A third, Marty Jackley, South Dakota's attorney general, unsuccessfully ran for governor of South Dakota in the June primary.

While the AGs are in traditionally red states that voted for Trump by double digits, polling for Morrisey and Hawley has been tight, possibly due to an uphill climb most parties in power often face during midterm elections.

Due to the overwhelming popularity of pre-existing condition protections, having their fingerprints on the lawsuit might only make things worse for the GOP candidates, and could risk the national party losing the Senate, which they hold by a slim 51-49 margin.

Hawley's would-be general election opponent, the incumbent Claire McCaskill, has already attacked him for his part in the suit.

No Tyler, he won’t. He is one of the AGs bringing the lawsuit to end the protection of those with pre-existing conditions. https://t.co/Ic13Et97z6 — Claire McCaskill (@clairecmc) June 8, 2018

Campaigns for Morrisey and Hawley did not respond to FierceHealthcare's request for comment by the time of this article's publication.

Beyond the two attorneys general, national Democratic committees have already sought to tie other GOP Senate candidates in competitive races, including current Florida Gov. Rick Scott, to the lawsuit.

"The question every Republican Senate candidate must answer: Do you agree that pre-existing condition coverage is unconstitutional?" the Democratic Senatorial Campaign Committee said in a press release.

RELATED: Red-state GOP candidates on the wrong side of ACA debate where voters favor fix over repeal

One public and healthcare policy adviser called the lawsuit "a gift" for Democrats ahead of the November elections.

"Democrats are making healthcare a top issue and will try to tie Republicans to this lawsuit," Julius Hobson, senior policy adviser at Polsinelli PC, told FierceHealthcare. "At the very least Republicans on this suit may be forced to lay out their justifications for fighting against pre-existing condition protections."