The mayor, however, previously had a friendly relationship with the company, although both sides disagree on when it began to deteriorate.

In late 2016, Mr. Fulop approached Airbnb for a contribution toward his re-election campaign, according to emails obtained by The New York Times. The following year, the mayor attended a fund-raiser at the company’s headquarters in San Francisco. But Airbnb’s promised contribution to the mayor did not immediately arrive.

In May 2017, Mr. Fulop sent three Airbnb employees a blistering email expressing his frustration with the delay and that his calls were being ignored.

Airbnb’s $10,172 contribution to Team Fulop — a joint committee to support the mayor and eight City Council candidates — arrived 12 days after the mayor’s furious email.

In a statement, Christopher Nulty, a spokesman for Airbnb, said the mayor’s relationship with Airbnb fractured as a result of the delay, and that Mr. Fulop soon began receiving donations from the hotel industry.

Mr. Fulop said he was frustrated at the time because the donation came after a crucial deadline to file a quarterly campaign report. But he said it was a lie that the ordeal had severed his relationship with Airbnb, which he accused of “resorting now to desperation. ”

Four months after Airbnb’s contribution, the Hotel Trade Council began donating to Mr. Fulop and his joint committee — an amount that has reached $33,200 since late 2017. Airbnb’s supporters have questioned the hotel union’s role in crafting the ordinance.