Republicans pounced Friday after all 10 Democrats in the presidential debate a night earlier called for extending taxpayer-funded health care for illegal immigrants.

“Millions of Americans struggle to pay their own health care bills. Now Democrats want us to pay illegal immigrants? We can’t afford their extreme agenda!” wrote Republican National Committee chairwoman Ronna McDaniel in one of a series of Twitter posts on the topic.

“Democrats want a socialist agenda that includes sky-high taxes on the middle class while giving free healthcare to illegal immigrants. @realDonaldTrump’s AMERICA FIRST policies are working for ALL Americans,” she added in another.

McDaniel also took aim at California Sen. Kamala Harris, who drew praise for her strong performance and takedown of ex-veep Joe Biden on the issue of race.

“Kamala Harris raised her hand in support of stripping millions of Americans off their private health insurance and then turned around and raised her hand in support of giving illegal immigrants FREE healthcare,” she wrote.

While all 10 of the participants — including four of the five frontrunners — backed the idea with a show of hands, South Bend, Indiana Mayor Pete Buttigieg best explained the reasoning behind the stance.

“This is not about a handout. This is an insurance program. We do ourselves no favors by having 11 million undocumented people in our country be unable to access health care,” he said.

He called for protections for Dreamers, illegal immigrants who arrived as children and are protected from deportation by the Deferred Action for Childhood Arrivals program.

President Trump crowed about the debate on Twitter from Japan, where he is attending the G20 summit.

“All Democrats just raised their hands for giving millions of illegal aliens unlimited healthcare. How about taking care of American Citizens first!? That’s the end of that race!” he tweeted.

Other Democrats had little to say about the candidates’ position today.

Chris Lee, a spokesman for Kaiser Family Foundation, which studies health care issues, said that without a specific proposal to analyze any cost estimate would be speculative.

But it would likely be hundreds of billions, experts surmised.

The foundation’s health news website noted that the US already spends billions annually in so-called Emergency Medicare payments to cover emergency room visits, births and other services provided to illegal immigrants who show up at hospital emergency rooms.

Chris Conover, from Duke University’s Center for Health Policy and Inequalities Research, wrote in Forbes in 2018 that American taxpayers shell out nearly $20 billion for health care for illegal immigrants.

“Rough estimates suggest that the nation’s 3.9 million uninsured immigrants who are unauthorized likely receive about $4.6 billion in health services paid for by federal taxes, $2.8 billion in health services financed by state and local taxpayers, another $3 billion bankrolled through ‘cost-shifting,’ i.e., higher payments by insured patients to cover hospital uncompensated care losses, and roughly $1.5 billion in physician charity care,” he wrote.

“In addition to these amounts, unauthorized immigrants likely benefit from at least $.9 billion in implicit federal subsidies due to the tax exemption for nonprofit hospitals and another $5.7 billion in tax expenditures from the employer tax exclusion. “