Over a bowl of pulled pork, lentils, giardiniera and mixed greens, with the Eagles’ Peaceful Easy Feeling playing in the background, Pete Buttigieg is asked a question that no elected official running for US president has ever been asked before. What was it like growing up gay?

“I wasn’t even prepared to acknowledge to myself that I was gay at school,” he said, reflecting on his childhood in South Bend, Indiana, a conservative state governed, until recently, by vice-president Mike Pence. “I had never met an out person my age the entire time I went to school; didn’t know that there was such a thing. I had heard of one at another school. So it was just literally out of the question.”

Being out is one of many noteworthy things about Buttigieg, a little-known contender for the 2020 Democratic nomination for the party’s candidate for presidency.

Bernie Sanders raises $5.9m in 24 hours after announcing 2020 campaign Read more

He is the son of a Maltese immigrant, Christian, contemporary of Mark Zuckerberg at Harvard, Rhodes scholar at Oxford, city mayor before his 30th birthday, Afghanistan war veteran, piano player, polyglot, fan of James Joyce and, now, at the grand old age of 37, would-be first millennial president.

Too much, too young? Democrats seem to like the promise of generational change, their past four presidents having been John F Kennedy (aged 43), Jimmy Carter (52), Bill Clinton (46) and Barack Obama (47). As Buttigieg likes to point out, he would take office with more military experience than any commander in chief since George HW Bush and, when he reaches Trump’s current age, the year will be 2054 – meaning that issues such as climate change are not abstract to him but viscerally personal.

His age and sexuality are standout features in a crowded Democratic field that he neither makes a big play of nor seeks to “paper over”. When he held his first meetings with Iowa voters, his husband Chasten was in the room. Last week Chasten, a teacher, retweeted a post from a Twitter user called Adam, from Alabama, that said: “I wish I could tell 15-year-old me who was praying for God to make me something other than gay, that at 32 you’ll be donating to an openly gay man making a run for president.”

Facebook Twitter Pinterest Buttigieg in front of the county courthouse in South Bend. Photograph: Lucy Hewett/The Guardian

Buttigieg sits down for lunch with the Guardian at the polished but unpretentious L Street Kitchen, one more indicator of South Bend’s rebound on his watch. Coming out here, he acknowledges, was a long and difficult process. “The hardest part was a period lasting a few years when I had decided that I was not willing to lie about this, and I also knew that I was not ready to talk about this, and I was simply relying on luck that nobody had really pushed me because I’d have to deflect something.”

Although he was not put in a position of having to choose between lying and coming out, at one point a local reporter threatened to out him which, he notes wryly, “was especially interesting because I had zero love life at that point so it was based completely on speculation”.

Elected mayor of South Bend at 29, he came out publicly in a column in the South Bend Tribune newspaper while seeking re-election. The governor of Indiana at the time was Pence, a born-again Christian who denies the right of LGBT people to marry or serve in the military, and who is now Trump’s vice-president. But South Bend is closer to Chicago than Indianapolis and Buttigieg won 80% of the vote, more than the first time – though even now, when he and Chasten go to church, a man walks outside brandishing a sign: “Same sex marriage is sin.”

Who's running in 2020? The full list of Democrats vying to take on Trump Read more

After lunch, Buttigieg crosses the street and is approached by a local man. He responds cordially, as he does dozens of times a day. This is the bread – and – butter of being mayor of a modestly-sized city, a post from which he took a seven-month leave to deploy to Afghanistan with the navy reserve in 2014.

He goes up to the 14th floor office where John F Kennedy’s inaugural address hangs above his desk, a photo of Buttigieg with Michelle Obama sits on a sideboard, and Winston Churchill’s 12-volume history of the second world war shares the bookshelves with Making Gay History by Eric Marcus. There is also a fragment of blue stone from Buttigieg’s first trip to Iraq as a civilian adviser; he recites the inscription in convincing Arabic, then translates: “‘Not everyone who rides on a horse is a knight.’ I keep it here to remind myself, just because you have an office or a title doesn’t mean much unless you do something with it.”

Facebook Twitter Pinterest A city pride sculpture on Michigan Street, a busy row of shops and office buildings in downtown South Bend. Photograph: Lucy Hewett/The Guardian

Buttigieg speaks Arabic, Dari, French, Italian, Maltese, Norwegian and Spanish to greater or lesser extents but has a Midwestern understatement that seems to neutralise Trump-era sneering and anti-intellectualism.

The mayor’s office offers sweeping views of South Bend, a city of 100,000 people that endured “rusted-out factories scattered like tombstones”, as Trump put it in his inaugural address, long before Nafta, mass automation or JD Vance’s Hillbilly Elegy. The Studebaker car assembly plant closed down a month after Kennedy’s assassination in 1963, resulting in lost jobs and lost pensions, depression, poverty and suicides, decades of population decline and empty shop fronts downtown. By 2010, South Bend was on Newsweek’s list of “America’s Dying Cities”.

Just because you have an office or a title doesn't mean much unless you do something with it

Surveying the snowy scene today, Buttigieg can see the hospital where he was born. He points to two identical churches, originally built for Irish and Polish immigrants, as evidence that this has always been a global city, and notes that 45% of South Bend’s current population is non-white. “Look at the size of that house: that shows you the scale of wealth that was associated with the industrial heyday. See out toward the horizon that long factory building? That was where the cabinet for every Singer sewing machine in the country was assembled.

Leftwing Democrats steal the 2020 spotlight but can centrists fight back? Read more

“This was the Silicon Valley of its day. Now we’re trying to get the term ‘Silicon Prairie’ to catch on because there’s a whole new shot at it.”

Visitors to the new South Bend are greeted by Buttigieg’s voice on the airport loudspeaker, rounding off: “Safe travels, and I’ll see you around the Bend!” His audacious 1,000 houses in 1,000 days initiative demolished or repaired abandoned homes. Old Studebaker buildings are being renovated and converted into mixed use spaces. Buttigieg made streets more pedestrian-friendly and introduced a public art installation called River Lights on the main waterway. He has also brought a millennial’s instinct for tech to running the city, gathering systematic data on everything from rubbish collection to gunshots.

Asked if any of this can be scaled up to America if he was president, Buttigieg contends that the kind of government shutdown that Trump oversaw is unthinkable at city level where, whatever the political differences, water must be supplied and snow must be ploughed. “There are no alternative facts. If there’s a hole in the road, I can’t bullshit people and say there’s no hole in the road. People can tell and they’ll beat me over the head until we fix it.”

Facebook Twitter Pinterest South Bend Code School HQ, in the former Studebaker building, teaches coding and programming skills. Photograph: Lucy Hewett/The Guardian

He adds: “There’s something in the midwestern political culture that’s very reality based that I think belongs more in the national dialogue. Also, the city stands as a reply to those who say that the midwest is absorbed in nostalgia and that the way to our hearts is resentment.”

Much has been written about Trump’s appeal to white rage, especially among blue collar workers in decaying rust-belt towns, and his promises to bring back coal mines and factories. Buttigieg took a different approach to his mayoral campaigns: “I don’t think an honest politics, no matter how good the past was – and our past is mixed – can contain the word ‘again’. That’s how we got elected: everybody was saying, ‘How do we get some version of Studebaker back here?’ and our message was we’re not, it’s not going to happen. That’s OK. Studebaker’s not coming back but we are and here’s how. It turned out after 50 years the city was ready for that.”

As candidates from Kamala Harris to Bernie Sanders to Elizabeth Warren to jostle for position on the ideological spectrum, where does Buttigieg sit? He might be described as a progressive pragmatist. He favours Medicare for All and the Green New Deal as “an ambitious set of goals” but says: “Part of my experience as a mayor is that a very pragmatic approach leads you in directions that sometimes look centrist and other times look very much leftist, but it’s just following facts and evidence where they lead.”

But even in South Bend, where people recently queued for more than two hours to get Buttigieg to sign copies of his new book, it is hard to find anyone who thinks he can actually win the White House next year. Some residents interviewed by the Guardian complain that, although downtown South Bend is flourishing, crime remains a problem in certain neighborhoods. To them, this run might look like a vanity project.

Jack Colwell, a veteran journalist who broke the story of the Studebaker plant’s closure in 1963, now a columnist at the South Bend Tribune, says: “He’s a long, long shot, but I think that he is doing the right thing by running. What does he have to prove in South Bend?”

Facebook Twitter Pinterest The Liberty Towers in downtown South Bend. Photograph: Lucy Hewett/The Guardian

Beside the old railway station (now a data centre) and inside a vast former Studebaker plant, what used to be the car assembly line is now a long carpet flanked by glass-walled offices. Upstairs, rent-free for the first two years, is the South Bend Code School, teaching young people computer code. Co-founder Alex Sejdinaj, 31, says: “This was a dying city but the mood has transformed: you can feel it on a cultural level, economic level, every level.”

Back in June 2016 in an article headlined “The First Gay President?”, New York Times columnist Frank Bruni praised Buttigieg and commented: “He seems always to say just the right thing, in just the right tone.” As if to prove the point, Buttigieg has an answer ready when interviewers ask him how he would combat Trump. “I grew up in Indiana and I’m gay,” he often says. “I’m comfortable dealing with bullies.”