The National Labor Relations Act gives employees the right to collective bargaining. But drivers for taxi, for-hire and app-dispatch companies like Uber and Lyft are categorized as independent contractors, rather than employees, so those federal protections don't apply to them.

Seattle is the first city in the U.S. to establish a framework for contract drivers to organize and to bargain for agreements on issues such as pay and working conditions.

Backers of the groundbreaking bill, including drivers, broke into applause after the vote in the council's crowded chambers and chanted, "When we fight, we win!"

Takele Gobena, a 26-year-old Uber driver and a leader among those pushing for unionization, called Monday's vote a victory. He was temporarily kicked off the app in August a few hours after taking part in a news conference with Councilmember Mike O'Brien, the bill's sponsor.

"I'm so excited. I'm so happy," said Gobena, of SeaTac. "This is a big change for us."

Uber and Lyft opposed the ordinance and argued that O'Brien's proposal violates federal labor and antitrust laws, meaning the city likely will be sued.

"Uber is creating new opportunities for many people to earn a better living on their own time and their own terms," the company said in a statement Monday.

Murray sent council members a letter before their vote expressing reservations. He's worried about costs related to overseeing the bargaining process and defending the ordinance in court, he said.

But O'Brien struck a triumphant note.

"This bill was only introduced out of necessity after witnessing how little power drivers themselves had in working for a living wage," he said, adding, "I am proud Seattle is continuing to lead the nation in advancing labor standards for our workers."

Under the ordinance, a taxi, for-hire or app-based vehicle-dispatch company will be required to provide the city with a list of its Seattle drivers. Then a nonprofit organization -- most likely a union -- will use the list to contact the drivers.

The nonprofit organization will need to gain the support of a majority of a company's drivers to be designated by the city as their bargaining representative.

The ordinance will require the company to seek an agreement with the representative organization. The city will enforce the ordinance's requirements through penalties such as fines, but not by revoking a company's license to operate.

The backdrop for the council's vote is a nationwide conversation about what role governments should play in the country's growing app-powered gig economy.

Companies like Uber and Lyft for rides, TaskRabbit for odd jobs and GrubHub for food delivery are attracting workers by offering more flexibility than conventional jobs.

But labor activists and others are worried about apps making it easier for companies to contract with independent workers and avoid paying minimum wages and benefits.

Drivers from several cities, including Seattle, are suing Uber for categorizing them as independent contractors, and politicians in Washington, D.C., and elsewhere are talking about whether a new benefits system or new worker category might be needed.

The lawsuits will focus on whether Uber controls drivers by setting fares and deciding who can work, or whether drivers are in charge by setting their own schedules.

O'Brien's proposal grew out of organizing by taxi, Uber and Lyft drivers in Seattle and from advocacy by Teamsters Local 117. Some drivers backing the bill have said that, after expenses, they make far less than the city's minimum wage driving for Uber and Lyft. Other drivers have said they like the way the industry operates now.

Uber ramped up its engagement in Seattle before Monday's vote. David Plouffe, a former political strategist for President Obama now serving as Uber's chief adviser, visited Seattle earlier this month to promote the company and to criticize the ordinance.

Uber recently chose the city for its launch of devices on some vehicle windshields that light up to help drivers connect with waiting riders.

Last week, it began offering a new service in Seattle called UberHop, where vehicles pick up riders at set spots along set routes. The company has been advertising heavily in local media, as well.

The council's finance committee approved the ordinance in October, but O'Brien delayed the final vote so that lawyers for the city could work to make it more legally sound.

Uber has sued King County and Seattle law firm Keller Rohrback in an attempt to block the county from releasing, under a public-records request by the firm, the number of licensed drivers the company has here.

In an interview during his visit to the city, Plouffe told The Seattle Times that Uber has more than 10,000 drivers in the city.

Dan Clark, 64, a part-time Uber driver from Auburn, opposes O'Brien ordinance because "it just seems wrong to have a union come in and dictate everything," he said.

Uber and Lyft could raise fares in Seattle. But Gobena, who said he drives 55 hours a week in addition to attending college, said he believes passengers are on his side.

"The riders, they see how much we're paid ... They feel so bad," the pro-union driver said. "We are just asking Uber to pay us a living wage. Seattleites want that."