In the span of just a few months, the idea of providing health care to illegal immigrants has morphed from a fringe, left-wing fancy to a plank of many 2020 Democrats' presidential campaigns -- but it’s a proposal that one study predicts would cost American taxpayers tens of billions of dollars a year.

A standout moment of the June 27 Democratic primary debate was that of all the candidates on the stage raising their hands, signifying support for government health care plans including “undocumented” immigrants.

ILLEGAL IMMIGRANTS SHOULD GET HEALTH CARE, SAY DEMS IN NIGHT 2 DEBATE

Republicans and the White House have seized on that moment, with President Trump declaring it “the end of the race.”

But with the campaign definitely not over, and a number of frontrunners now backing the policy, more attention is turning to how much it could cost to give millions of illegal immigrants health insurance. On Thursday, the Center for Immigration Studies (CIS), a policy group that advocates for lower levels of immigration overall, published a study finding that the cost could be up to $23 billion a year.

While candidates have not necessarily gone into detail about their plans, CIS cites an Atlantic survey that found that Sens. Bernie Sanders, I-Vt., Kamala Harris, D-Calif., and Elizabeth Warren, D-Mass.; and former Housing Secretary Julian Castro would all provide “full benefits” to those in the country illegally.

The CIS study estimated that 4.9 million illegal immigrants have incomes below 400 percent of the poverty line and also do not have insurance -- meaning they have incomes low enough to receive coverage via either Medicaid or the Affordable Care Act -- also known to many, particularly critics, as ObamaCare.

The study estimates that if all income-eligible, uninsured illegal immigrants received subsidies under the ACA, then the cost to insure would be $22.6 billion, but with “likely enrollment” of 46 percent, the total cost would be perhaps $10.4 billion a year. It predicts that the average cost of a subsidized premium would be $4,637.

If a mixed approach of ACA subsidies and Medicaid enrollment were used, the cost would dip to $19.6 billion with 100 percent enrollment, and $10.7 billion assuming “likely enrollment.”

These numbers could change significantly if a more overarching health care overhaul is passed by a future Democratic White House and Congress.

“Numbers aside, the fact that presidential candidates are advocating spending billions of dollars on people who are in the country illegally is significant in its own right,” the report concludes. “It suggests that allowing in large numbers of less-educated workers will inevitably generate significant political pressure to provide them access to social programs.”

Extending health care to illegal immigrants could, however, be only one part of the cost to taxpayers of more generous social policies being pushed by Democrats.

AOC PUSHES NATIONAL RENT CONTROL, WELFARE FOR ILLEGAL IMMIGRANTS IN LATEST MASSIVE PROPOSAL

Rep. Alexandria Ocasio-Cortez, D-N.Y., who was an early champion of left-favored policies now finding their way into 2020 Democratic platforms, recently introduced a new package of policies known as the “Just Society.”

Among those bills is “The Embrace Act,” which would allow illegal immigrants to claim the same welfare benefits as U.S. citizens and those in the country legally.

CLICK HERE FOR THE ALL-NEW FOXBUSINESS.COM

"Notwithstanding any other provision of law ... an individual who is an alien (without regard to the immigration status of that alien) may not be denied any federal public benefit solely on the basis of the individual’s immigration status,” the bill reads.

The bill defines a federal public benefit as: “any grant, contract, loan, professional license or commercial license provided by an agency of the United States or by appropriated funds of the United States; and ... any retirement, welfare, health, disability, public or assisted housing, post-secondary education, food assistance, unemployment benefit,or any other similar benefit for which payments or assistance are provided to an individual, household, or family eligibility unit by an agency of the United States or by appropriated funds of the United States.”