“A mayor can’t do much when it comes to immigration policy,” Pete Buttigieg wrote in his memoir, Shortest Way Home: One Mayor’s Challenge and a Model for America’s Future.

But in his two terms as mayor of South Bend, Buttigieg has found creative ways to navigate within the strictures of local office to bring undocumented immigrants and their families into the city’s fold, running a city with a growing immigrant population under a president who has made the deportation of millions of undocumented people his signature issue.

Partnering with local nonprofit organizations, Buttigieg has instituted a “Community Resident Card” program to help undocumented South Bend residents open bank accounts and fill prescriptions, led “Know Your Rights” events for residents in South Bend’s Latino-heavy West Side to prepare them in the event of federal immigration operations, and even helped create a phone tree to alert local families in the event that ICE raided the homes or businesses of city residents.

“We, along with several other community organizations, lead a process of coming up with our local response plan to the rumor of, or actual ICE raid in our area,” Sam Centellas, executive director La Casa de Amistad, told The Daily Beast. La Casa coordinated with representatives of Buttigieg’s office to set up a roster of the best people to contact in the event of a federal immigration enforcement operation, Centellas said, and for advice on the best ways to communicate.

Genevieve Miller, deputy chief of staff and policy director for Buttigieg’s mayoral office, described the effort to The Daily Beast as a collaboration with community groups “to identify community members who can be contacted if there is an immigration event.”

The group—composed of members from local faith-based organizations, several local nonprofits and a few attorneys and community leaders who volunteered time—was the result of the “first scare of the Trump era,” Buttigieg wrote in his memoir. Rumors of impending immigration raids in South Bend had swept through the city’s West Side last month, and several small businesses had shuttered for days as families took refuge in a local church.

“Parents had grabbed their kids from Harrison Primary Center and small shops closed for the day,” Buttigieg recalled in Shortest Way Home. “After that day working the phones to verify this was all a false alarm, my staff and I added to our mayor’s office to-do list the creation of a phone tree in the event of immigration raids.”

Buttigieg, now an upper-tier candidate for the Democratic presidential nomination, is now proposing that some of his immigration initiatives be taken nationwide. On Tuesday, Buttigieg’s campaign released a sweeping set of policies intended to strengthen rural America—a key component of which is the creation of a location-based “Community Renewal visa” to encourage working-age immigrants to relocate to U.S. counties facing a shrinking population.

“Immigrants can and should be essential players in the growth of our economy, and it’s time we start recognizing that when we expand our lawful immigration system, everyone benefits,” the policy paper states, proposing that the new visa designation would target counties that have lost prime working-age populations. In return for three years of residence and employment in such communities, the visa would fast-track visa holders for a green card, and would allow the admission of spouses and children “to preserve family integrity and foster community integration.”

Increased immigration to the heartland also forms a key component of Buttigieg’s rural health plan, released last Friday, which would expand a waiver program that allows foreign doctors training in the United States to work in rural or medically underserved areas instead of returning to their home countries for two years, as currently required.

Although Buttigieg’s campaign has not yet put out a comprehensive immigration plan, the immigration-related proposals in the candidate’s other white papers are an extension of his approach to immigration in South Bend, where he has made welcoming immigrant residents to the region a key component of the city’s economic growth strategy.

“Pete is proud of the strong immigrant community in South Bend, which has helped the city grow, contributed to the economy, and enriched the city’s social fabric,” Marisol Samayoa, the Buttigieg campaign’s deputy national press secretary, told The Daily Beast. “Pete has worked to adopt policies that help immigrants feel welcome in South Bend, creating a phone tree in case of immigration raids, and helping jumpstart initiatives like the Municipal ID program so that immigrants in South Bend can live without fear.”

“Immigrants contribute to communities around the country, which is why, at this critical moment in our nation's history as Washington continues to fail us, Pete will continue to push for real solutions to our broken immigration system,” she added.

Much of Buttigieg’s immigration rhetoric has focused on the contributions that South Bend’s newest residents have made to the surrounding community, particularly to the region’s economy.

“Pete knows immigration can help communities across our country reverse population declines and rebuild neighborhoods as well,” Samayoa said.

Fifty-nine percent of South Bend’s population growth between 2011 and 2016 came from immigration, and a research brief released by the city in partnership with local religious and economic groups found that immigrants to the region contributed $3.1 billion to the region’s GDP in 2016, paying an estimated $212.8 million in federal taxes and $103 million in state and local taxes.

“I guess the president thinks America’s full. We’re not. I would be delighted to have more people,” Buttigieg said during a CNN immigration town hall in April. “We’ve got plenty of room for more residents and taxpayers who want to fund the snowplowing and the firefighters that I gotta have for 130,000 peoples’ worth of city, with only 100,000 people to pay for it.”

Part of that welcoming strategy has been to assure immigrants in the city, documented or otherwise, that they are safe in South Bend. At one “Know Your Rights” event early in Trump’s presidency, hosted by the National Immigrant Justice Center and La Casa de Amistad, a local immigrant community organization, Buttigieg told residents in Spanish that “our police are here to keep you safe, not to practice federal immigration enforcement.”

“The last thing our law enforcement needed was for Latino families to be afraid even to speak to our officers, especially if they had information needed to solve or prevent crime in their neighborhoods, all because they conflate local police with federal immigration authorities,” Buttigieg wrote in his memoir, published earlier this year.

Although South Bend is forbidden under state law from claiming “sanctuary city” status, Buttigieg has described the city’s policy as “welcoming,” and has insisted that South Bend police do not assist in the enforcement of federal immigration law, which he has likened to “conscription.”

But perhaps the most innovative immigration policy enacted under Buttigieg has been the creation of an identity card program through a public-private partnership with La Casa de Amistad. The program, dubbed “SB ID,” is intended to help South Bend residents who can’t obtain driver’s licenses or passports access critical services.

La Casa de Amistad distributes the IDs, which thanks to an executive order signed by Buttigieg are recognized by law enforcement, schools and libraries. Local banks and pharmacies also recognize SB ID, allowing those without identification to open bank accounts, obtain financial statements and pick up medications. And because the program is administered by a private organization, the identities of recipients can’t be obtained via public records requests, providing shelter for those worried that their immigration status might become public knowledge.

Not that anti-immigrant groups haven’t tried. Last week, the conservative legal organization Judicial Watch announced that it was filing an Access to Public Records Act (APRA) lawsuit against South Bend, Indiana, seeking all records of communications from Buttigieg’s office related to the program’s creation.

“Mayor Buttigieg’s city administration in South Bend is in cover-up mode on his work for special ID cards to make it easier for illegal aliens to stay in the United States contrary to law,” Judicial Watch president Tom Fitton said in a statement announcing the suit. “Judicial Watch made simple open records requests and have faced nothing but games from the Buttigieg administration—which is why we had to sue.”

Both Buttigieg’s campaign and mayoral office denied any attempt to stymie the request, saying that the records in question don’t even exist.

“It’s clear that this is an attempt to scare the undocumented community,” said Samayoa, calling the timing of the suit “ridiculous.”

“After a domestic terrorist drove to El Paso to kill Latinos, this right-wing group is continuing the GOP's fearmongering that inspired this attack in El Paso,” Samayoa continued. “It’s an attempt to deter cities from standing up for immigrants.”

The suit—and the program that prompted it—are part of the double-edged nature of Buttigieg’s status as the mayor of a city, rather than a member of Congress. Being a city executive means that you are the closest to meat-and-potatoes issues that resonate with voters, both for good and for bad.

“They’re the closest to the people, and they’re not in Washington,” a political consultant who is currently working with one of Buttigieg’s rivals for the Democratic nomination, told The Daily Beast about mayors. “Washington, D.C., is not particularly popular with the American public right now. To be able to say, ‘I am not part of the problem, I am part of the solution’ is extremely advantageous.”

Part of pitching those solutions, Buttigieg told reporters while touring the grounds of the Iowa State Fair on Tuesday, is emphasizing the lesson that all mayors learn: at the end of the day, we’re all neighbors, and that “it’s hard to hate from up close.”

“Very rural, very conservative areas are much more open on immigration when they personally know immigrants," Buttigieg said. “People have been told immigration is the problem. I think it does change the way we look at things versus when it’s kind of all this fear of the unknown.”