A visitor was heading to the exit of the Edgar Allan Poe House and Museum. “Thank you for coming to Baltimore,” said Shauntee Daniels, a local heritage official, “with our rats and all.”

Turning in the doorway, the visitor, a middle-aged woman, replied: “I know better than that. I know too many good people here.”

Daniels’ rodent reference was an ironic nod to Donald Trump who last July launched a war of words on Baltimore, a black-majority city near Washington. The US president described it on Twitter as a “rat and rodent-infested mess,” and a “dangerous and filthy place” where “no human being would want to live”.

Not for the first time, Trump moved swiftly on but the victim of his verbal assault could not. Several national and international conventions halted plans to come to the city because of the tweets, according to Al Hutchinson, president and chief executive of Visit Baltimore, a tourism organization that hosted the Guardian last week.

“When negative comments like that are made, especially on a national platform, they matter, they make a difference,” Hutchinson said.

People protest as Donald Trump arrives to speak at a fundraising event in Baltimore on 12 September 2019. Photograph: Eric Baradat/AFP/Getty Images

But Baltimore, less than 45 miles from the White House, fought back. The city took out ads in three major newspapers celebrating its positive side. Trump was condemned by a punchy local newspaper editorial headlined “Better to have a few rats than to be one”. When Trump ventured to the city last month, was greeted by a giant inflatable rodent with the slogan: “Trump is a rat”.

Then last week, as Baltimore reeled from the death of congressman Elijah Cummings, a target of Trump’s invective, it so happened that Hutchinson was visiting the White House to make his case to top officials. “We shared all the good news stories about Baltimore and we asked the administration to be helpful in the travel and tourism conversation, help us to promote this great city, help us to promote job creation, help us to create great travel to this city,” he said.

“We said to them that it was very important that they tone down the rhetoric. We want them to celebrate Baltimore, but the bigger story is we want them to celebrate all great cities in this country because we believe that travel and tourism creates a lot of jobs, a lot of tax revenue comes into these communities, and we need the administration to be a friend of travel and tourism and not a foe.”

Hutchinson plans a major rebranding of the city next year intended to pull together its different communities and attractions for the first time. Among the bright spots likely to be highlighted is R House, a food hall and space for pop-ups that opened in an abandoned garage in 2016 and now attracts nearly a million people a year.

Aerial view of Fort McHenry and the Baltimore skyline. Photograph: Alamy

Thibault Manekin, co-founder of the company behind it, Seawall Development, had been “living out of a backpack” for six years doing NGO work in the Middle East and Africa before deciding to return here. “I had a completely different appreciation of this city, having left for so long,” he said.

“I love the place because of the people. People that live in the city are so resilient. Everybody bets against Baltimore because of shows like The Wire and the way it’s portrayed. But people here love it and are addicted to the place. It’s a small pool and you can have massive impact.”

R House allows chefs to rent a space of 300 square feet instead of 5,000 square feet so they can concentrate on cooking rather than the bureaucracy of running a business. One bustling lunchtime last week, Manekin observed: “Without a doubt, this is the most racially diverse place you will visit in Baltimore.”

Masonic guards stand in front of an image of the late congressman Elijah Cummings at Morgan State University in Baltimore this week. Photograph: Julio Cortez/AP

The 41-year-old rejected Trump’s derisive words about Maryland’s biggest city. “I have two kids. We talked about bullying. If it’s not true, you don’t let it affect you. Our resilience allowed us to move past that quickly and move onwards through action and not words.”

Yet crime does cast a long shadow in Baltimore. There have been 277 murders so far this year, following 309 last year and 342 the year before, according to the Baltimore Sun newspaper. A landmark New York Times magazine article in March was headlined “The Tragedy of Baltimore … Inside the crackup of an American city.” And some here still carry the weight of the HBO drama series The Wire, which depicted drug kingpins, corrupt politicians and morally exhausted cops with matchless potency, putting Baltimore on the map only to become a millstone around its neck.

From schools to infrastructure, the problems are thrown into sharp relief by neighboring Washington, currently enjoying an economic boom, a slew of new hotels and restaurants and even sporting success with a team in baseball’s World Series.

But Baltimore residents are unwilling to be portrayed as the ugly sibling.

More than 26 million visitors came to Baltimore last year, up 2% from 2017 and 14.6% from 2012. Downtown accommodation options include the The Ivy, a stately 1890 mansion that has been transformed into a luxury boutique hotel by Eddie and Sylvia Brown, an African American couple who moved there in 1973 and became prominent philanthropists.

Sylvia, 80, said: “Our president made a really ugly remark about our city and that didn’t help, but people know how fantastic the cultural activities are in the city. Those people know about the museums and sports and so many wonderful things going on in this city that attract people.”

Eddie, 78, was among city leaders who signed a joint letter expressing pride in the city two days after Trump’s Twitter assault. He added: “We’re very optimistic on the future and we’re willing to make a large investment because we love the city and think it has a great future.”

Boisey Neal, 12, sells bottled water to passing motorists on the corner of Orleans Street and North Milton Avenue in the McElderry Park neighborhood of Baltimore. Photograph: AP

Forthcoming attractions include the restored home of HL Mencken, a celebrated journalist and author whose assignments included the 1925 Scopes “monkey trial” in Tennessee. Daniels, executive director of the Baltimore National Heritage Area, has just set up office in the room where Mencken died in 1956 but is less concerned about ghosts than more pressing issues of the Trump era.

She does not think Trump’s summer tweets did long-term damage. Quite the contrary. “In a lot of aspects, Trump probably did us a big favor. He brought it to people’s attention that there’s a little city at the mouth of the Patapsco river on the banks of the Chesapeake.”

In recent years Baltimore’s cultural scene has attracted Britons such as the actor and playwright Kwame Kwei-Armah and poet Andrew Motion. When Chris Bedford, born in Irvine, Scotland, and raised near London, announced that he was moving there to become director of the Baltimore Museum of Art in 2016, he found conflicting reactions. Younger people praised its creativity and urged him to go, he recalled. “Older generations said, ‘You must be insane, you’re going to be shot, the school system is appalling.’”

Young people ride their bikes near a police car while they gather in the parking lot of Hip Hop Chicken in Baltimore. Photograph: Stephanie Keith/Reuters

But the city’s pressing social problems give artists and curators a sense of urgency, the 42-year-old added. “It makes the act of being here not just exciting but meaningful. It wouldn’t feel as pressing in another city.”

Last year the museum auctioned off seven paintings – including an Andy Warhol – for $18m so it could buy works by African American artists, described by Bedford as “the most important art of our time. We want to explore the connection between this golden generation and a majority-black city.”

Longtime residents who have seen the crime waves and corruption scandals – the city’s mayor quit in disgrace in May – come and go remain phlegmatic.

Tony Jernigan, 47, a taxi driver, said: “I don’t think we’re that different from any major city in the United States. There are some eyesores and some communities that need to see better days but there are a lot of things about the city that need to be noticed. I can go to any major city and see rats.”

A pedestrian walks past a mural in western Baltimore, near the site where Freddie Gray was beaten by police. Photograph: Michael Reynolds/EPA

Follow Guardian Cities on Twitter, Facebook and Instagram to join the discussion, catch up on our best stories or sign up for our weekly newsletter.