Buttigieg was thinking like a consultant — fixing the problem by hiring as his new chief an outsider from Boston who was white — and who had a reputation for developing policing strategies based on data. The mayor wasn't thinking like a politician with a human touch.

In interviews with NBC News, city leaders and residents assessed "Mayor Pete" in similar terms: He was young. Lacked executive experience and a diverse staff. Too data-driven, too hurry-up. His administration was brash and didn't communicate effectively with key players. Decision-making was confined to a small group; by the time problems surfaced, it was often too late.

Those shortcomings became most pronounced with Buttigieg's plan to knock down or rehab 1,000 vacant homes in as many days that were not being kept up to code. They were concentrated in poor and minority neighborhoods.

Everyone in South Bend agreed that, like so many post-industrial cities, it had a real problem with abandoned homes, but many took issue with the way Buttigieg’s administration tackled it. In particular, leaders and residents of the west-side neighborhoods whose homes were largely targeted said Buttigieg moved too fast and made the data on which the plan was based the priority over the input of the people affected.

"Part of his data-driven approach, and part of the ambitious timelines he set for himself, meant that when things went wrong, they often did harm before things could be fixed," said Nate Levin-Aspenson, a South Bend activist with the local chapter of Indivisible, a national progressive group. "That’s kind of the peril of taking a data-driven approach. Your data and algorithms always reflect the biases of the people who create them."

James Mueller, a high school friend of Buttigieg who served as his chief of staff and is now the Buttigieg-endorsed candidate to succeed him as mayor in the November election, acknowledged there was a steep learning curve.

"Certainly, smart 20-somethings think they know more than they do. And so he wasn't immune to that at different points in his life," Mueller said. "I'd say we've all grown since 29."

The 'aha moment'

A self-described introvert, Buttigieg found that one of the most trying parts of the job was all the standing around and smiling and polite applause he had to take part in.

But when an 18-year-old African-American was shot and killed while sitting on his front porch near Buttigieg's boyhood home on the city's northwest side, the mayor met with the mother of the victim.

"I had no relevant skills for this situation; nothing from my McKinsey training or college education was going to be useful here," Buttigieg wrote in his memoir, "Shortest Way Home: One Mayor's Challenge and Model for America's Future."

"What mattered to her was that I showed up," he continued. "In contrast to my student or consulting days, the value was not in the cleverness of what I had to say, but simply the fact of my being there."

Isaac Hunt, who leads a crime-reduction effort called the Group Violence Intervention that Buttigieg brought to South Bend, called it an "aha moment."

"You could see it in is face," Hunt said, recalling how Buttigieg looked after meeting with the murder victim's mother. "I think it was the first time he'd seen something like that, and it was like, 'Wow, I didn't know.'"

"From that moment on, I've seen him operate differently," Hunt added.

In the months and years to come, Buttigieg would learn to listen carefully to how his decisions affected his constituents and would come to heed their concerns with a revamped approach that relied more on personal experiences and narratives and less on data.

He began trying to communicate better with the city's minority community, making efforts to listen and learn about how his "1,000 Homes" and downtown revitalization initiatives were not helping low-income neighborhoods.

"You have to give credit to an administration that is now becoming responsive," said Regina Williams-Preston, a Common Council member who has been critical of Buttigieg. "There's something to be celebrated about how we've moved through this process and deepened our relationships with one another by kind of allowing ourselves to wrestle with those issues because a lot of times, we don't want to talk about it."

Buttigieg also started meeting quarterly with the city's Latino leaders and began acting on their concerns.