SAN FRANCISCO — Over the last few years, so-called sharing companies like Airbnb and Uber — online platforms that allow strangers to pay one another for a room or a ride — have established footholds in thousands of communities well before local regulators have figured out how to deal with them.

Now, as cities grapple with the growth of these services and try to pass rules for how they should operate, the companies are fighting back by turning their users into a vast political operation that can be mobilized at any sign of a threat.

Airbnb offered the latest and most vociferous example of this on Wednesday. Fresh off defeating a San Francisco measure that would have severely curtailed the company’s business in its hometown, Airbnb staged a news conference that functioned as a warning shot to other cities thinking about proposing new regulations.

The event was billed as a debriefing to discuss the defeat of Proposition F, which would have toughened existing rules for the service by, among other things, cutting the number of nights people could rent out rooms in their homes.