Mayor Pete Buttigieg’s presidential campaign on Wednesday slammed a lawsuit filed against his city's innovative identity card program, which is aimed at lending a helping hand to undocumented immigrants.

His campaign called the suit, brought by conservative legal group Judicial Watch, a “political stunt that is intended to scare immigrants.”

The rebuke from the Buttigieg campaign came less than 24 hours after Judicial Watch said it was suing South Bend, Indiana, for records and emails related to its “Community Resident Card” initiative — a first-of-its-kind government-endorsed, privately run program that helps the small city’s undocumented population access services.

"Pete is proud of the immigrant community's contributions to South Bend, and he will continue to work to protect immigrant rights and help them feel welcome in South Bend,” Chris Meagher, the national press secretary for Buttigieg’s campaign, told NBC News.

In a separate statement, a spokesman for South Bend told NBC News that the city will "continue to protect the well-being of all who live in our neighborhoods."

"Records related to the Municipal ID program are inaccessible by public records laws, as they are maintained by the nonprofit," the spokesman, Mark Bode, told NBC News.

Judicial Watch said Tuesday that it had filed an open records suit against the city for "records of communications between Mayor Pete Buttigieg’s office related to the creation of a municipal ID card for illegal aliens."

South Bend’s “Community Resident Card” program, as NBC News reported in June, was the result of Buttigieg’s desire to coax the city’s 4,500 undocumented immigrants out of the shadows without jeopardizing their well being. Advocates and legal experts say the program appears designed to fend off open records request and suits like the one filed by Judicial Watch.

"Doing this kind of program privately comes with a prominent benefit — confidentiality,” Jackie Vimo, a policy analyst at the National Immigration Law Center, told NBC News in June. “The best way to make sure sensitive data isn’t shared is to make sure that you don’t have any sensitive data to share.”

Working closely with La Casa de Amistad, South Bend's main Latino outreach center, Buttigieg and the nonprofit's executive director, Sam Centellas, imagined a program under which the IDs would be paid for, created and distributed by the group — a private organization — rather than the city.

Buttigieg's part to make it all work was to sign an executive order requiring local services and institutions — like law enforcement, schools, the water utility and libraries — to accept the card as a valid form of identification. The city also enlisted local businesses, such as financial institutions and drugstores, so cardholders could open bank accounts and pick up prescriptions.

As a result, undocumented immigrants in South Bend have been able to partake in many routine aspects of daily life without fear that their names or immigration status might end up in the hands of authorities or anti-immigrant groups.

That's because La Casa, as a private organization, isn't bound by requests for public records the way the city might be if it were running the program. La Casa says they don't even keep a list of people it has printed cards for — something that wouldn’t be possible at an official municipal level.

Immigration advocates have lauded the unique approach, explaining to NBC News in June that the public-private structure would protect already vulnerable undocumented community.

“It keeps the interests of the city, and these individuals, safe and ensures that undocumented immigrants are fully integrated into the fabric of South Bend, while keeping that data at an arm's length away from rogue actors,” Ali Noorani, executive director of the National Immigration Forum, a nonpartisan immigrant advocacy group, told NBC News. “The way they have set this up has mitigated the risk of a rogue agency or organization from taking action.”