The traditional hospitality industry can compete against short-term rental sites, but they need to assertively stress their own strengths.

There’s no denying it; the growth of online lodging services such as Airbnb represents a threat to traditional hotels. Airbnb will provide 5.4 percent of the country’s lodging room total this year, up from 3.6 percent in 2015, according to Goldman Sachs. If that number seems small, consider that just five hotel-management companies top the 5 percent mark. Travelers spent $2.4 billion on Airbnb lodgings in the 12 months through September 2015, with more than 55 percent going to New York, Los Angeles, San Francisco, Miami, and Boston.

“The competition from Airbnb is coming across all price tiers and brands,” says Jamie Lane, senior economist for CBRE Hotels in Atlanta. “Talking with hotel companies, it’s on everyone’s mind—from Choice and Extended Stay [on the low-price end] to higher-end Hiltons and Marriotts.”

To some extent, hotel companies will have to accept their new competitor, analysts say. “Hotels know they can’t put the genie back in the bottle,” says David Loeb, senior real estate research analyst at Robert Baird investment bank in Santa Fe, N.M.

In their initial attempt to fend off the online darling, hotel companies pushed states and municipalities to enforce zoning codes that prohibit short-term rentals. “That has proven to be unsuccessful,” says Jan deRoos, professor of hotel finance at Cornell University. “Cities are more interested in collecting taxes than enforcing zoning codes.”

But analysts say hotels can fight back in another way: by building on their own strengths and promoting them vigorously. “The hotel industry has to talk about the experiences it offers, its consistency, and how it’s better,” deRoos says.

Jan Freitag, senior vice president at STR, a hotel research firm in Hendersonville, Tenn., agrees. “Hotels can say, ‘We offer unique experiences, such as architecture and food,’” he says. “It’s an easy counter. It’s just a matter of marketing them.”

Hotels can also help their case by reminding consumers what they like about patronizing them. “A lot of people go to hotels for the overall experience,” says Philippe Zrihen, managing director of real estate for investment bank Houlihan Lokey in New York. “They are influenced by additional amenities that you don’t get at someone’s house.” He says the key is to stress those amenities and make them more accessible. “That could be chairs on the beach, a masseuse, food delivery to the room, concierge service,” Zrihen says.

Hotels have plenty of different ways in which to impress their guests that aren’t available on smaller properties. DeRoos took notice when he attended a meeting in the New York Hilton recently that began with an appearance by the FDNY Emerald Society Pipes and Drums corps. “It was quite an impressive way to start a meeting,” he says.

Hotels can market their consistency and their status as respected brands by emphasizing other offerings that aren’t available at short-term rentals. “They can rely on attributes they have that Airbnb doesn’t,” Loeb says. Airbnb may tout individualized experiences available in its lodgings. “But hotels are great for reliability and flexibility with arrival time,” he says. “If your plane is eight hours late, there will be someone with a key.”

Then there are security issues. If you are concerned for your physical safety, there’s someone who can help you or send security to your room, Loeb notes. And if a pipe bursts, someone is on call 24 hours a day. Hotels now trumpet these differences after living in denial for the first few years of Airbnb’s ascent, he says.

Airbnb has been a positive force in making hotels more customer-centric, analysts say. “It has put more pressure on companies to deliver what they should deliver anyway,” Zrihen says. “This has forced hotels to start down the long path of better articulating and adhering to the experience they’re giving.” Among the brands handling the challenge well are the Four Seasons Hotels, The Ritz-Carlton, W Hotels, and Courtyard by Marriott, he says.

Hotels are doing a good job of spiffing up their public spaces, “inviting people to spend time in them,” Lane says. “It’s more like a European hostel environment, not the isolating experience that you’d get in someone’s apartment on Airbnb.”

Some chains have responded by creating new brands that offer a funky vibe—Hilton Curio, Hyatt Unbound, and Marriott Autograph Collection all serve as examples of this trend. “They keep a unique identity, but can use the brand’s reservation system and back end,” Lane says. “Those hotels always have a strong demand and aren’t seeing as much impact” from Airbnb.

Of course there’s another strategy hotels can pursue: If you can’t beat them, join them. Choice Hotels offers private vacation homes listed for rent on its website. Meanwhile, Hyatt has invested in Onefinestay, which provides online booking of short-term rentals for luxury homes in London, New York, Paris, and Los Angeles. The two companies are exploring possible areas of cooperation; already, Onefinestay guests coming to London on overnight flights can store their bags and wash up in guest rooms at the Hyatt Regency Churchill while waiting for their Onefinestay rental to be available.

So now that online short-term rentals have disrupted the hotel industry, perhaps hotels may soon return the favor.