PAUL J. RICHARDS/AFP/Getty Images

Down in the trenches of the ongoing ground battle between ride-sharing apps and local regulators, Lyft and Uber have had a rough week.

Lyft on Thursday agreed to a $300,000 settlement with New York State's attorney general and top insurance regulator for allegedly violating laws that require drivers to carry state-authorized insurance. The firm also agreed to give at least three weeks notice to cities before launching the car-sharing service.

Bad news also hit Uber, which on Wednesday was handed an unfavorable decision from the California Labor Commissioner's office. The regulator sided with an Uber driver's complaint that she should be classified as an employee and not a contractor. The office ordered the company to pay her $4,152.20 in expenses and other costs.

The decision brought fresh attention to a debate over labor practices underlying the sharing economy, which has expanded to meal deliveries, valet parking and freelance software coding. On the one hand, Uber has defined itself as simply an app that allows a vast driver network of independent contractors to connect with customers. It says most of its drivers are part-time and enjoy the flexibility of working when it is convenient for them. But labor activists and some regulators say many drivers work long hours and are taking on the added costs of gas and insurance and should be entitled to the protections and benefits that have been required by employers for generations.

The decisions in New York and California are limited in scope and came amid rigorous ground campaigns by sharing economy firms to challenge incumbent transportation, hospitality, service companies -- as well as the local regulations written for those industries decades ago. Uber, Lyft and room-sharing app AirBnB have successfully deployed armies of lobbyists to write new rules around the nation that ensure their companies can legally operate and compete. They've recently hired a slew of lobbyists in Washington D.C. to brandish their images to federal lawmakers.

Lyft's troubles in New York began in July 2014 when New York Attorney General Eric T. Schneiderman and the New York State Department of Financial Services filed a lawsuit against the company for allegedly allowing drivers to operate without state-approved insurance. State officials also claimed that the service violated state and municipal laws when it launched operations in Buffalo and Rochester in April 2014 without obtaining approvals or notifying those cities of its operation. On July 11, 2014, Lyft further angered officials in Brooklyn and Queens by only giving the jurisdictions a few days notice before beginning its service.

“I have always been committed to fostering an innovative and competitive environment in which both new and existing companies can flourish in our great state,” Schneiderman said in a statement Thursday. “However, it’s critical that the laws put in place to protect consumers and ensure fair competition are not violated in the process. Today’s agreement enables Lyft to grow and prosper within the bounds of state and local regulations, while the penalties imposed send the message that companies that attempt to skirt the law will be held accountable."

Lyft and Uber, however, say they will have to fight city by city to see regulatory changes that would allow them to expand their global driver network. In many cities, such as Las Vegas and New York, the companies have encountered massive protests by taxi drivers who say they can't compete with the lower prices offered by Lyft and Uber drivers who don't have to pay the same costs for insurance and regulatory fees.

Lyft's settlement is just the start of its New York battle. Its lobbyists there continue to push for legislative reforms that would allow the car-sharing app to operate outside of New York city with its own insurance program.

"Today's mutually agreed upon settlement does not require any changes to existing Lyft service in New York. The settlement is part of our continued efforts to return true, peer to peer ride sharing to New York State at large, an effort supported by leaders and consumers across the state," the company said in a statement.

Uber also downplayed the effect of the California decision, saying it has appealed the ruling.

"It’s important to remember that the number one reason drivers choose to use Uber is because they have complete flexibility and control," an Uber spokesperson said. "The majority of them can and do choose to earn their living from multiple sources, including other ride sharing companies."