Virginia is open for business to rideshare companies Uber and Lyft—at least, for now, and with lots of strings attached.

Gov. Terry McAuliffe and Attorney General Mark Herring announced this week a temporary agreement with the two companies that allows them to operate, so long as Uber and Lyft comply completely with a slew of “safety-related” precautions.

The next battle for the two companies will be winning the legislation war come 2015, by which time the Virginia Department of Motor Vehicles will have completed a study of how best to allow the companies to operate.

>>> Virginia DMV Attempts to Shutter Ridesharing Companies Uber, Lyft

In June, the Virginia DMV invited the rage of Uber and Lyft passengers—and the praise of taxicab companies—when it sent cease-and-desist letters to the companies, urging them to stop operating or face fines because they didn’t comply with all of the state’s regulations.

But public backlash and pressure from Uber and Lyft forced the state to reconsider in what has become a tale of free markets, government regulation and the role the government should or shouldn’t play in keeping its citizens safe.

Uber lets riders to check driver satisfaction ratings—and allows drivers to check rider satisfaction ratings—before selecting a ride nearby, all from a smartphone. Lyft works similarly.

>>> Seattle’s Rideshare Caps Will Squash Innovators Such as Uber

Herring sent out a letter to supporters announcing the rideshare “cooperation”—and the regulations that go with it—as the best way to keep Virginians safe:

I knew there had to be a better way to ensure the safety of Virginia passengers. These companies offer services that Virginians want, but it just wasn’t acceptable for them to operate without complying with regulations or other measures to help ensure the safety of passengers and motorists. I’m proud that we were able to get folks back to the table and get them talking again, and now we’ve shown that Virginia can be responsive to innovative businesses while promoting public safety and the rule of law.