SAO PAULO — Thousands of drivers from Uber and cabbies faced off in Brazil’s capital Tuesday as the Senate voted to soften proposed new regulations that the ride-sharing app said would sink its business in its second-largest market worldwide.

In the latest threat to Uber’s global business, senators debated a bill passed in April by Congress’ lower house that called for municipal governments to regulate ride-sharing apps, including requiring insurance for carrying passengers and pension benefits for drivers. It also had requirements for increased oversight of drivers and their cars.

Hundreds of cabbies as well as drivers for Uber and other ride-sharing apps followed the session from the hallway, cheering those who spoke in favor of their positions. Some drivers called out the names of senators who disagreed with them and booed. Outside, police used pepper spray and formed a human cordon to separate thousands more drivers from both sides who had been shouting at one another.

Senate President Eunicio Oliveira said senators could not accept the legislation as written and wanted to find a compromise balancing the interests of the two types of drivers, one that “doesn’t crush one and doesn’t crush the other.”

Late Tuesday night, the Senate made amendments to the bill, meaning it will go back to the lower Chamber of Deputies for further consideration.

The Senate threw out a requirement that Uber cars have red license plates like taxis and that Uber drivers be owners of the vehicle they drive. It wasn’t immediately clear how those changes would be received by the lower house.

Congressman Carlos Zarattini, who wrote the original bill, had acknowledged that the measure as passed by his house would likely end ride-sharing as it currently existed, but he and other lawmakers said the apps offer too little protection for their drivers.

Among the other contentious points was a requirement that drivers get an authorization from the city in which they operate. That could mean drivers couldn’t take passengers from Sao Paulo, for instance, to the city’s international airport, which is in another municipality.

Uber had called the changes a “covert ban” and said they would make business in Latin America’s largest nation unviable. It launched a lobbying campaign against the bill, collecting the signatures of more than 800,000 Brazilians who say they oppose it.

Uber has faced similar challenges in other countries. Last month, London’s transport regulator stripped Uber of its license, though the company continues to operate while it appeals. It has been the subject of litigation in France, where it has been banned from offering rides with non-professional drivers. It is fighting new regulation in Quebec and threatened to pull out of that market.

Walking away from Brazil could be harder, though. The Brazilian market has exploded for Uber and it is now the company’s second-largest market behind the United States in terms of rides.

Other similar services exist in Brazil, such as Cabify, but Uber is the major player. The company says it has more than 500,000 drivers in Brazil, with more than 17 million users — making Brazil home to about a quarter of the company’s drivers and users worldwide. In Sao Paulo, the largest city, it has 150,000 drivers alone, compared to more than 37,000 active taxi licenses.

Drivers for the ride-sharing app say the work is a lifeline as Brazil’s economy struggles to recover from its deepest recession in decades. Unemployment stands at 12.4 percent, and many drivers say they turned to Uber when they lost more traditional jobs.

“If this bill is approved, basically 500,000 drivers will be without income,” said Marlon Luz, an Uber driver who helped organize a protest against the bill in Sao Paulo on Monday.

And passengers “will be without urban transport,” Luz said. He said Uber drivers are willing to go where many taxi drivers won’t: into Brazil’s slums and other low-income neighborhoods where public transportation is often scarce.

As in other countries, taxi drivers accuse Uber of unfair competition, saying the company is able to undercut the prices of cab rides because it doesn’t face the same regulation. The lack of regulation, they argue, puts passengers at risk.

Roberto Ferreiro, a Sao Paulo cabbie who has been driving for 35 years, said his business has fallen 30 percent since the arrival of Uber, which coincided with the 2014 World Cup.

Passengers “use it because it’s cheaper. And the question of security? What is cheap ends up expensive,” he said.

But Tais Souza said she feels safer with Uber than in a taxi because the app tracks every journey and records the name of the driver.

She acknowledged that price first drew her to the service, but she continues to use it because of the ease of hailing a car on her phone and because she knows the price of her journey before she gets in.

“Taxis in Sao Paulo are a mafia,” said Souza, who works for a travel agency.


Associated Press writer Mauricio Savarese in Brasilia contributed to this report.