Lyft announced Thursday that will pay $300,000 to settle allegations of illegal operations in New York state. Aside from the cash settlement, the company agreed to have its drivers carry state-issued insurance as well as comply with other state laws.

"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.

The San Francisco-based transportation service's problem began in July 2014, when Attorney General Eric Schneiderman and former N.Y. Superintendent of Financial Services Benjamin Lawsky filed a lawsuit alleging that the company was "running an unlicensed insurance business in New York," according to TechCrunch.

"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. "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."

Securing the proper insurance and abiding with the state laws are just the beginning. Lyft is also required to inform the authorities three weeks ahead if it plans to expand to another city. Last year, Lyft angered the City Taxi and Limousine Commission (TLC), the state agency that regulates public vehicles and some luxury limousines, after launching its service without proper authorization, Digital Trends reported.

Lyft's major competitor, Uber, also had a bad hit after the California Labor Commissioner's office favored a driver's complaint about labor practices. The regulator ordered Uber to pay the complainant $4,152.20. Unlike Lyft, Uber said it would appeal the ruling.