James Martin/CNET

Edan Alva started driving for Lyft more than four years ago as your typical side hustle. Then he lost his job and began relying on his Lyft wages to pay the bills. It didn't take take long for Alva to realize he couldn't make enough to pay for rent or his son's health insurance.

"[Lyft] seemed like a promising solution, Alva said. "It became a feeling of being trapped."

On Friday, Alva and about 40 other Uber and Lyft drivers gathered in downtown San Francisco to demand the ride-hailing giants for better conditions. The gig economy workers were protesting for higher pay and a union.

In an open letter, published to coincide with the protest, drivers called on Uber CEO Dara Khosrowshahi and Lyft co-founders Logan Green and John Zimmer for changes in treatment. Drivers tried to present the letter at the protest, but weren't able to enter Uber's headquarters. "We'll be back," they chanted in response.

"Drivers need a seat at the table as equal partners to chart our path forward," wrote representatives of Gig Workers Rising and Mobile Workers Alliance, two groups of drivers. "It's time for Uber and Lyft to do right by us."

The protest comes as California considers Assembly Bill 5, which could allow for drivers to be classified as employees, rather than independent contractors as they currently are. As employees, the drivers would be eligible for benefits and have the right to organize collectively.

The Assembly, California's lower chamber, passed AB 5 in late May. It's currently in the State Senate.

Uber and Lyft have previously called for amending current laws to allow for more worker benefits, including paid time off and retirement planning, irrespective of worker classification. They also supported the establishment of a new driver association that would represent driver interests and administer benefits.

Lyft says it recognizes the concerns of drivers.

"Lyft is advocating for an approach in line with the interests of our driver community, by modernizing century old labor laws that make it difficult to provide both flexibility and benefits," the company said in a statement. "It's encouraging that more groups are joining the conversation to preserve flexibility for drivers while also providing new benefits and protections."

Uber echoed the sentiment.

"We will continue to work collaboratively with our diverse community of drivers -- and the legislators who represent them -- to improve the quality and security of independent work," an Uber representative said in a statement.

The I'm Independent Coalition, a project of the California Chamber of Commerce, said in a statement that it didn't oppose AB 5 "but is advocating for a modern approach that protects what drivers care about the most – flexibility – while expanding modern labor protections such as benefits and pay transparency." The coalition supports independent contractors, including Uber and Lyft drivers who wish to remain independent.

The issue of gig worker classification has simmered for years, and lawsuits have been filed against both Uber and Lyft. Several cities and states have looked at the issue, and New York City passed minimum wage laws for drivers last year.

In May, the National Labor Relations Board said drivers should be classified as contractors instead of employees.

At the Friday protest, drivers complained the relationship between the companies and its contractors was unfair.

"We're the ones that have helped these companies become rich," said Linda Valdivia, who's driven for Uber and Lyft for about three years. "We want to claim our own rights as drivers. We want to have our own benefits."

Drivers responded by cheering, "Drivers united will never be defeated."

"Stop fighting with us," Valdivia said. "Stop treating us like we're disposable and sit with us at the table."

Alva, the Lyft driver, reiterated the complaints.

"We will not stop until we are heard," Alva said. "We demand Uber and Lyft to listen to us."

Originally published July 19, 10:10 a.m. PT

Update, 10:47 a.m.: Adds Uber statement. Update, 11:33 a.m.: Adds comment from the I'm Independent Coalition. Update, 12:54 p.m.: Adds quotes from protesters.