(Justin Sullivan/Getty Images)

Two weeks after the ride-hailing company Lyft’s plans to launch service in New York City were halted by complaints from state officials, the service announced that it expects to begin service on Friday night.

Lyft — like Uber, but with pink mustaches on the cars (well, most of them) — was all set to launch in Brooklyn and Queens on July 11, promising new passengers free rides for the first two weeks and saying the service offered another necessary transportation option.

Some officials in New York were not fans of the idea. Eric T. Schneiderman, the state’s attorney general, argued that the service would break numerous laws. His office and the office of Benjamin M. Lasky, the state’s superintendent of financial services, filed for a temporary restraining order aimed at keeping Lyft from starting. (This came a few days after Schneiderman announced that Uber, another ride-hailing service, had agreed to limit its infamous “surge pricing” during natural disasters and similar emergencies.)

The New York City Taxi and Limousine Commission was also less than thrilled. Lyft agreed to postpone its launch while it worked with the commission to make sure the service could operate while following the rules.

On Friday, Lyft announced that it would start operation in all five boroughs of New York City after coming to an agreement with the offices of Schneiderman and Lasky. The company will start offering only commercial drivers at 7 p.m. on Friday. (They’re calling the launch a “Lyft-off,” which seems worth sharing.)

While the deal only allows for commercial drivers, the company said in a blog post Friday it considers this “the first big step in finding a home for Lyft’s peer-to-peer model in New York.”

As part of the agreement, Lyft will suspend service in Buffalo and Rochester by Aug. 1 until it can operate under the state’s extant insurance laws and regulations. Schneiderman’s office and the state’s Department of Financial Services said that they would withdraw their application for the temporary restraining order once Lyft halts service in these two cities.

“We will continue to work with Lyft so that any future business it undertakes meets that standard and protects consumer safety,” Schneiderman and Lawsky said in a joint statement. “We look forward to exploring solutions that enable companies in the sharing economy to operate and thrive throughout New York State.”

Lyft has been valued at more than $700 million.