In this photo taken Wednesday, May 14, 2014, Google team members pose by a Google self-driving car at the Computer History Museum in Mountain View, Calif. From left is project direct Chris Urmson, Brian Torcellini, Dimitri Dolgov, Andrew Chatham and Ron Medford, the director of safety for the project. (AP Photo/Eric Risberg)

MOUNTAIN VIEW, Calif. (AP) -- About four years ago, the Google team trying to develop cars driven by computers -- not people -- became convinced that sooner rather than later, the technology would be ready for the masses. There was one big problem: Driverless cars were almost certainly illegal.

And yet this week, Google said it wants to give Californians access to a small fleet of prototypes it will make without a steering wheel or pedals.

The plan is possible because, by this time next year, driverless cars will be legal in the tech giant's home state.

And for that, Google can thank Google, and an unorthodox lobbying campaign to shape the road rules of the future in car-obsessed California -- and maybe even the rest of the nation -- that began with a game-changing conversation in Las Vegas.

The campaign was based on a principle that businesses rarely embrace: Ask for regulation.

The journey to a law in California began in January 2011 at the Consumer Electronics Show in Las Vegas, where Nevada legislator-turned-lobbyist David Goldwater began chatting up Anthony Levandowski, one of the self-driving car project's leaders. When talk drifted to the legal hurdles, Goldwater suggested that rather than entering California's potentially bruising political process, Google should start small.

Here, in neighboring Nevada, he said, where the Legislature famously has an impulse to regulate lightly.

It made sense to Google, which hired Goldwater.

"The good thing about laws is if they don't exist and you want one -- or if they exist and you don't like them -- you can change them," Levandowski told students at the University of California, Berkeley in December. "And so in Nevada, we did our first bill."

Up to that point, Google had quietly sent early versions of the car, with a "safety driver" behind the wheel, more than 100,000 miles in California. Eventually, government would catch up, just as stop signs began appearing well after cars rolled onto America's roads a century ago.

If the trigger to act was a bad accident, lawmakers could set the technology back years.

Feeling some urgency, Google bet it could legalize a technology that though still experimental had the potential to save thousands of lives and generate millions in profits.

The cars were their own best salesmen. Nevada's governor and other key policymakers emerged enthusiastic after test rides. The bill passed quickly enough that potential opponents -- primarily automakers -- were unable to influence its outcome.

Next, Nevada's Department of Motor Vehicles had to write rules implementing the law.

At the DMV, Google had an enthusiastic supporter in Bruce Breslow, then the agency's leader.

Breslow had been fascinated by driverless cars since seeing an exhibit at the 1964 New York World's Fair. Seeing a career-defining opportunity, Breslow shelved other projects and shifted money so he wouldn't have to ask for the $200,000 needed to research and write the rules.

At first, DMV staff panicked -- they only had several months to write unprecedented rules on a technology they didn't know. But Google knew the technology, and was eager to help.

"Very few people deeply understand" driverless car technology, said Chris Urmson, the self-driving car pioneer lured from academia who now leads Google's project. Offering policymakers information "to make informed decisions ... is really important to us."

The task fell primarily to David Estrada, at the time the legal director for Google X, the secretive part of the tech giant that houses ambitious, cutting-edge projects. Estrada would trek from San Francisco to Nevada's capital, Carson City, for meetings hosted by DMV staff.

Breslow credited Estrada with making suggestions that made the regulations far shorter, and less onerous, than they would have been. "We quickly jumped in ... to help figure out what the regulation should look like," recalled Estrada.

While others attended the meetings, Google seemed to have a special seat at the table.

Bryant Walker Smith, who teaches the law of self-driving cars as a fellow at Stanford University, described one rule-drafting session where Google -- not the DMV -- responded to suggestions from auto industry representatives.

"It wasn't always clear who was leading," Smith said. It seemed to him that both Google and the DMV felt ownership of the rules.

By the end of 2011, Nevada welcomed the testing of driverless cars on its roads. Google, however, was focused on its home state, where its Priuses and Lexuses outfitted with radar, cameras and a spinning tower of laser sensors were a regular feature on freeways.

In many ways, Google replicated its Nevada playbook: Frame the debate. Wow potential allies with joy rides. Argue that driverless cars would make roads safer and create jobs.

In January 2012, Google met with state Sen. Alex Padilla, a Massachusetts Institute of Technology engineering graduate. Padilla was intrigued, and agreed to push a bill. Padilla said Nevada's law helped him sell colleagues on the need to act.

"California is home to two things. Number one is the hotbed of innovation and technology. And second, we love our cars. So it only made even more sense to say, 'OK we need to catch up and try and lead the nation,'" Padilla said.

Nevada's swift action, he said, "sent the signal to a lot of colleagues that, 'No, this is not one we want to overthink and study for five years before we take action.'" After all, who in California government wanted a flagship company moving jobs out of the state.

In March 2012, Padilla rode in the driver's seat of a Google car with Levandowski riding shotgun to the news conference announcing his legislation.

In the months that followed, various groups tried to shape Padilla's bill.

One was the Alliance of Automobile Manufacturers, which objected that automakers would be liable for the failure of Google technology strapped onto one of their cars. Trial lawyers, a powerful constituency in the state, successfully lobbied to keep automakers on the hook.

Some inside the Capitol concluded that Padilla was most attuned to Google.

One thing that troubled Howard Posner, then the staffer on the Assembly Transportation Committee responsible for analyzing the bill and suggesting improvements, was that Padilla's legislation would let cars operate without a human present.

Posner argued that lawmakers shouldn't authorize this last step until the technology could handle it. The response, he said, was that Padilla didn't want to do that -- "which in my mind meant Google was not willing to do that."

Padilla said that while Google's high profile helped the bill succeed, his office made the decisions. "We're always going to have the final say," he said.

In September 2012, Gov. Jerry Brown went to Google's headquarters and signed Padilla's bill.

Now, California's motor vehicles officials face an end-of-year deadline to write regulations that will allow driverless cars to go from testing to use by the public in June 2015.

At a DMV hearing in March, two Google representatives sat next to DMV staff at the head tables. Their message: Now that self-driving cars were legal, the state should not regulate them too strictly.