This week California legislators signed binding legislation that makes Google’s driverless cars perfectly legal on state roads. The law, as written, still requires a human passenger to be seated behind the wheel and have the capability to take control of the vehicle manually in case of emergency.

California is now the second state, after Nevada, to legalize the use of driverless, or automated, cars. Nevada too requires these cars to have a passenger seated behind the wheel at all times in case they need to take control of the vehicle. And the vehicles themselves must be engineered in such a way as to make the transition from automated to manual mode simple and instantaneous.

The recent legislation in California clears the way for Google, manufacturers and dealerships to begin offering these vehicles as an option to consumers within the next five years.

The cars, being tested by Google for two years now, combine different technologies including radar sensors in front, video cameras scanning the surroundings, plus various sensors and artificial-intelligence software to assist in steering.

Google has already been testing the cars in Nevada, where a law for driverless automobile was approved last year. As with California, the state requires the cars to have a human behind the wheel who could take over at any time.

Google said that the cars have accumulated more than 300,000 driving miles. Around 50,000 of those miles were without aid from human drivers. The car’s only documented accident was a fender bender that happened with a human in control.

There are still some problems to be worked out, such as who is liable if the vehicle does indeed become involved in a crash and what, if any, information Google will collect about where the vehicle travels and who is riding in it. It seems that these issues will be worked out soon, however, because some consumers, especially senior drivers and those who care for people with special needs, have expressed a great deal of interest in them, meaning the market is ripe for this new technology.