Here’s payback for Edward Snowden, comrades.

The feds have criminally charged nearly 50 Russian nationals for allegedly stealing from American taxpayers in a massive Medicaid scam — despite the fact that they are protected by diplomatic immunity.

The Russian diplomats and their families were living lavish New York lifestyles, enjoying exotic vacations and expensive clothing, jewelry and gadgets — all while allegedly lying about their incomes to defraud the US health-care program set up to assist the poor.

“Diplomacy should be about extending hands, not picking pockets in the host country,” US Attorney Preet Bharara said at a Manhattan press conference.

Bharara announced the complaints but no arrests, because 38 of the defendants are no longer in the country and the remaining 11 are protected by immunity.

The Justice Department’s public very public shaming of Russian officials smacked of payback for the Kremlin’s granting asylum to the fugitive NSA leaker Snowden.

Russian Deputy Foreign Minister Sergei Ryabkov told the Interfax news agency in Moscow ‘‘we are bewildered” that the US government publicized the charges before speaking to his country.

He said the allegations cater to “Russophobic forces” and may reveal an effort in Washington to spoil progress toward settling major Russia-US conflicts.

Asked whether they believed Snowden’s asylum played a role in the decision to charge the Russians, spokesmen for Bharara and the Russian mission to the United Nations declined to comment.

But one diplomat heading into the Russian mission Thursday said, “It is quite possible this is retaliation for Snowden.”

“It is possible that was in their [US authorities’] deliberations.”

Bharara noted the State Department would seek a waiver from the Russian government to make arrests, and if that fails, request that the 11 remaining individuals — 10 of whom live in New York, with one in Washington, DC — leave the country immediately.

“The scam exploited a weakness in the Medicaid system, and the charges expose shameful and systemic corruption among Russian diplomats in New York,” he said.

The complaint alleges 25 diplomats and 24 spouses submitted applications that underreported their income to qualify for Medicaid for pregnancies and care of children. The FBI said 58 of the 63 births attributed to Russian diplomats in the city from 2004 to 2013 were paid for through Medicaid.

The scam cost taxpayers $1.5 million in benefits, Bharara said.

“Any other country that has diplomats engaging in this kind of fraud should now be on notice that it will be exposed and the conduct will be charged criminally,” Bharara said.

While raking in the benefits, the diplomats spent tens of thousands of dollars on cruises, watches and shoes and jewelry at Tiffany & Co., Prada and Bloomingdale’s, the complaint says.

In one case, ex-diplomat Timur Salomatin and his wife allegedly applied for pregnancy benefits in November 2010 and June 2011. Mikhail Korneev, a former counselor at the mission, signed off on papers that underreported Salomatin’s income, court papers say.

In February 2011, Salomatin applied for a credit card that said his monthly earnings were $8,333 — about double what he claimed in the Medicaid applications.

Meanwhile, the couple made $50,000 in purchases, including $8,400 from the Apple Store and more than $10,000 from Prada, Bloomingdale’s and other retailers.

The feds say the family got nearly $31,000 in Medicaid benefits they were not entitled to.