The deal that, for now, decided the ride-hailing behemoth Uber's future in New York City began with a phone call to Rome.

City Council Speaker Melissa Mark-Viverito on Tuesday called Mayor Bill de Blasio, who was attending a conference at the Vatican, to tell him she had secured enough votes to pass legislation that would put a severe cap on Uber's growth.

But she warned she was losing support and stressed that she wanted to find another option, according to a city official briefed on the call who was not authorized to publicly discuss a private conversation and spoke to The Associated Press on condition of anonymity.

Within hours, Deputy Mayor Tony Shorris, who was leading the Uber negotiations in de Blasio's absence, received an email from Michael Allegretti, Uber's New York director of public policy. The body of the message was blank, but the subject line said: "Let me know if you want to speak this evening..."

With a phone call and email, both sides were back at the bargaining table after a week's worth of harsh words and blistering TV ads. Wednesday, they gathered at an office across the street from City Hall, so as not to attract attention, and struck the deal that ended the strafing and sidelined a City Council vote on the cap Thursday.

Under the agreement, Uber would turn over an unprecedented amount of ride data to the city and move toward increasing the accessibility of their cars and contributing funds to the region's transit network. In exchange, the city would take the cap off the table during a four-month study of Uber's impact on city traffic.

But while the de Blasio administration is touting the concessions it received from Uber, its hopes for a clear-cut victory lap have been dashed.

De Blasio was jeered at City Hall on Thursday by yellow taxi drivers who yelled that he "caved" to Uber. A tabloid front page screamed that the mayor "bails on limits" and credited Gov. Andrew Cuomo for the victory and even supermodel Kate Upton who had tweeted her support for Uber.

The mayor was blindsided by criticism from a furious Mark-Viverito, who objected to the mayor's assertion that he still wielded the threat of a cap if Uber failed to cooperate during the study.

"I'm not going to allow anyone to attempt to save face at the expense of this Council," a visibly angry Mark-Viverito told reporters at a City Hall press conference. "This Council decides what we discuss, what debates we will have, what will be taken off the table, what will be on the table. No one else leads that discussion. No one else influences that discussion."

The strong words from Mark-Viverito, normally a reliable ally, rattled the mayor's office, which had been pushing back against the perception that it had backed down against the $40 billion, San Francisco-based company. De Blasio, speaking for the first time about the deal Thursday morning, continued with the strong rhetoric that marked his comments about Uber in the days before the deal.

"Uber is a multi-billion dollar corporation, which is looking out for its own interests and its own profitability. You know, let's not kid ourselves about their motivations," said the mayor, before vowing that he was "100 percent willing" to push for a cap on Uber's growth.

The cap was at the heart of the battle between City Hall and the ride-sharing company, which has previously sparked unrest and litigation in London, Paris and California.

De Blasio said a cap was needed to study Uber's impact on congestion. Uber steadfastly opposed any cap, and unleashed a $3 million ad campaign against de Blasio, accusing him of being in the back pocket of the yellow taxi industry and ignoring minority riders in the outerboroughs who struggle to find taxis.

A spokesman at Uber declined comment Thursday. But the company's deal with the city, just a day old, already appears to be receiving attention from a powerful outside force.

Cuomo, who has made a habit of meddling in de Blasio's affairs, suddenly announced in a radio interview that a regulatory network will be needed for Uber as it expands statewide. He said he would ask company representatives to meet in the coming days; it was not clear how that would affect the deal.

--Associated Press