LAS VEGAS — Arnie DeGeorge sat weeping in an airport bar in Toronto as a television broadcast images from his hometown of Las Vegas.

Worried strangers asked whether he was all right. He wasn’t.

It was a day after his city had been hit by the worst mass shooting in modern U.S. history. Nothing made sense. DeGeorge began to write.

“What is strength? Strength isn’t anger. Strength isn’t vengeful. Strength isn’t rage. Strength is unity.”

His words were soon heard by multitudes.

DeGeorge is an executive at the marketing agency contracted by the Las Vegas Convention and Visitors Authority and the creator of the first television ad it released since the Oct. 1 shooting that left 58 people dead and about 500 others wounded at the Route 91 Harvest Festival.

Tennis legend and Las Vegas resident Andre Agassi narrates the spot over a black screen as the skyline of the Las Vegas Strip slowly comes into view.

“Strength is valet parkers who become medics, mothers who become emergency responders, sisters who shield brothers because they love them with a love that has no bounds,” he continues in a solemn voice. “Strength is first responders who tirelessly carry visitors and locals alike to safety until sunrise.

“Strength isn’t evil or misguided. Strength is the voice of community and love in the face of the unspeakable. Strength is when we all pull together and rise up, all of us in every corner of this world. Strength is what we all are today and strength is our promise for tomorrow.”

It was a dramatic departure from the city’s free-spirited, wink-and-nod marketing message that had been in place since 2004: “What happens in Vegas, stays in Vegas.”

For a city whose economic engine is tourists and conventions, the visitors authority had to delicately balance sensitivity to the tragedy with the message that Las Vegas — which had $9.7 billion in gaming revenue and nearly 43 million visitors last year — was still open for business.

Michael Green, a history professor at the University of Nevada, Las Vegas, said the city had always been able to adapt — remaking itself as a family destination with baby boomers vacationing with their children, an escape from the world amid economic downturns, and more recently a place with professional sports teams.

“Las Vegas has a history of marketing to the moment,” Green said. “Of course Vegas had to respond to this in a different way, and the current marketing campaign tracks with its history of how to respond to changing times and circumstances.”

The shooting hit the community hard, and it sought solace in memorials, candlelight vigils and blood drives. But the city also needed to keep visitors coming.

When the Pulse nightclub shooting happened last year in Orlando, Fla. — another city heavily reliant on tourism — the local tourism board responded with ads that used social media posts from people saying they still planned to visit, interspersing them with photos of support from around the world.

George Aguel, president and chief executive of Visit Orlando, said in a statement that the key was connecting on an emotional level with people who come to the city.

“Visitors instinctively reached out on our social media channels to express their love and commitment to traveling here,” he said. “We created videos and content that highlighted the beautiful sentiments we were privileged to receive.”

In Las Vegas, social media became the basis for DeGeorge’s second ad, which began airing last week and during the first game of the World Series.

It features social media posts from people vowing to come to Vegas and how important the city is to them. DeGeorge said he was struck by how many said Vegas was like a second home.

“It’s not something I would’ve even thought,” he said. “It was a real emotional connection people had.”

Both ads also made history by running during an NFL game.

The league had long refused all ads promoting Las Vegas amid its worries about gambling. But with the city landing the Oakland Raiders — whose players donned #VegasStrong on their helmets in honor of the victims of the shooting — the NFL seems to be softening its stance.

The tourism authority isn’t the only organization grappling with how to address the rampage.

MGM Resorts, which owns Mandalay Bay, the hotel from which gunman Stephen Paddock carried out the massacre, launched its own campaign last week on Twitter and Facebook: “Together, we rise. #VegasStrong.”

The company also announced it was bringing a WNBA franchise to the city.

Oscar Goodman, the flamboyant former mayor of Las Vegas, who travels and promotes the city on behalf of the visitors authority, said he hadn’t changed his tactics while doing his job. He said he still traveled with showgirls on his arm and a martini in his hand.

“People know we had a horrible event here, and at the same time, they know Las Vegas is a place that they can have their convention or meeting and have a good time afterward,” he said.

“People look at us in a different light too, as they see us as a very giving and embracing community, and I think that is some of the good that has come as a result of this evil act. That is the way of life.”