Uber and Lyft have won temporary state approval to continue providing ride-sharing services in Virginia.

Soon after state officials said Wednesday that they had reached an agreement with the transportation networking companies, Uber said it plans to offer service in the Richmond area.

“UberX is in testing phase in Richmond, but we expect the full launch to happen later this week,” company spokesman Taylor Bennett said about its cheaper car service.

Customers use smartphone applications for Uber and Lyft to request rides and pay for them.

The agreement, one of the first of its kind in the nation, came two months after state officials said the car-ride companies were violating state law and ordered them to stop operating here.

The companies have been at odds with states across the country as governments wrestle with how to regulate the high-tech business, and in Europe as traditional taxicab services seek curbs against the mobile-app business model.

The deal was the result of extensive discussions between the companies, the Virginia Department of Motor Vehicles, the governor’s office and the attorney general’s office.

Taxi industry leaders, including plaintiffs in a Fairfax County lawsuit against the two ride-sharing companies for unauthorized service, said they object strongly to the agreement granting temporary operating authority to the companies.

“The fact that Uber and Lyft received today’s authority through direct action from the governor’s office and the attorney general follows a nationwide strategy by the companies in which they commence service without compliance with state or local laws — and then seek extraordinary relief from the highest levels of government once legal action occurs,” the Northern Virginia taxi companies said in a joint statement.

“Today’s issuance of temporary authority to an out-of-state carrier is both unprecedented and illegal,” said Spencer Kimball, owner of Northern Virginia Checkered Cab.

State officials said the agreement provides a temporary legal framework to help ensure the safety of passengers, bring the companies into compliance with Virginia law, and promote a level playing field for all transportation providers.

“In order for Virginia to remain economically competitive, it is important that we welcome innovative companies like Uber and Lyft and provide them with the resources they need to safely and effectively operate in the commonwealth,” Gov. Terry McAuliffe said.

Uber Technologies Inc. and Lyft Inc., both based in San Francisco, currently operate in Northern Virginia and Hampton Roads.

While Uber plans to offer service in the Richmond area, Lyft is not yet looking here.

“While Richmond would be a great city for Lyft, we have not made any plans to launch there,” said Chelsea Wilson, spokeswoman for Lyft.

When Uber and Lyft customers request a ride, they can see where a driver is on their smartphone screens and how long it will take for a driver to pick them up. They get an estimate of what a ride will cost and pay for their ride through their smartphone app, where they have stored credit card information.

Attorney General Mark R. Herring said the companies offer services that Virginians want, but it wasn’t acceptable for them to operate without complying with regulations.

“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,” Herring said.

He said people in Virginia will have more transportation options that are safer, more transparent and appropriately regulated.

“I hope other states will look to Virginia as a model for how to safely integrate the so-called sharing economy,” Herring said.

Michael Beckerman, president and CEO of the Internet Association, a Washington-based trade association for Internet companies, lauded the agreement but said it needs to be followed with permanent operating authority for ride-sharing companies.

“Virginia has signaled to the rest of the country that it stands for innovation, choice and opportunity,” said Uber’s Bennett, adding that the company looks forward to working with state officials to make Virginia a permanent home for Uber.

Dave Estrada with Lyft said Virginia has led the way in embracing innovative industries and his company looks forward to helping craft new rules for peer-to-peer transportation.

Carl Tobias, a law professor at the University of Richmond, said Virginia should encourage new technology that has economic benefits. “However, one major concern is how the state will guarantee that Uber and Lyft will (ensure) the safety of passengers.”

As part of the agreement, DMV told Uber and Lyft that their applications for transportation broker’s licenses and temporary operating authority were granted, effective immediately.

The companies must meet extensive regulations to promote passenger safety and comply with Virginia law. If either company fails to comply, DMV can revoke the temporary operating authority.

The regulations include:

Background checks of drivers, with immediate disqualifiers including convictions for any felony, fraud, sexual offenses, violent crimes or registration as a sex offender.

A review of driving history, with disqualification for drivers convicted of three or more moving violations in the last three years, driving under the influence of alcohol or other substances, underage drinking, refusal to submit to a device to test blood-alcohol level, hit and run, eluding law enforcement, or a revocation of a driver’s license.

Zero tolerance for the use of drugs or alcohol by any driver, and a suspension pending investigation of any driver accused of violating the zero-tolerance policy.

Only employing drivers who are properly licensed and over 21, and vehicles that carry a maximum of seven passengers and are properly registered and inspected for safety and emissions, where applicable.

Rigorous insurance requirements, including requiring drivers to maintain automobile liability insurance, maintaining an additional $1 million of coverage from the moment a driver accepts a trip request until the passenger leaves the vehicle, and liability insurance for drivers who are logged on to the companies’ software but not providing services.

DMV is leading a study at the request of the General Assembly to develop a long-term legislative solution that addresses services provided by Uber, Lyft and similar companies, while ensuring fairness for taxicabs and other passenger transportation services.

The study is scheduled to be completed by the 2015 legislative session.