Silicon Valley was alarmed. Across the country in Washington, federal lawmakers were proposing legislation that could have crippled the efforts of Web companies to collect consumer data that is crucial to selling advertisements online.

After a year of negotiations, the White House on Thursday unveiled privacy guidelines for these firms that urged them to install “do not track” technology on browsers but fell short of requiring it. Tech giants, in particular Google, breathed a sigh of relief. They would agree to curb some tracking activities, but it would largely be on their terms and wouldn’t hobble their cash cow.

“The White House announcement is a huge victory for Google on privacy,” said Jeff Chester, executive director of the Center for Digital Democracy.

The “victory” didn’t happen by accident. Google has become a major force in Washington.

Once disdainful of the lobbying tactics of other companies, Google’s Beltway operations have become nearly indistinguishable from the most powerful corporations that line K Street. Last year, it doubled the amount it spent on lobbying to $10 million and doubled the size of its employee political donation fund to $836,000.

These efforts have come as regulators are increasing scrutiny of the company’s activities. Google is facing federal probes on antitrust and privacy that could greatly shape its future. Next week, Google will roll out a privacy policy that will enable it to build more sophisticated profiles of its customers, a move lawmakers say should be investigated.

Google capped the reinvention of its Washington operations Thursday by announcing that former congresswoman Susan Molinari (R-N.Y.) will head its D.C. staff. Molinari has made public appearances on behalf of GOP presidential candidate Mitt Romney. After she left Congress in 1997, Molinari became a registered lobbyist and represented the Association of American Railroads, mortgage giant Freddie Mac and Verizon Communications, according to the Sunlight Foundation.

“She will help lawmakers better understand our company, how it works and what its impact is,” said a Google official, who spoke on the condition of anonymity. Google officials declined comment publicly on the company’s lobbying operations.

Google has hired several Republican political veterans over the past year, trying to defuse criticism by lawmakers that the firm is too cozy with the Obama administration. Chairman Eric Schmidt is a White House economic adviser, and Google’s former head of global public policy, Andrew McLaughlin, was Obama’s deputy chief technology officer.

“Like a lot of tech firms, Google came in with a thought leadership think-tank approach,” said Dean Garfield, president of the Information Technology Industry Council. “But they are now realizing that you have to create an environment for success, and political communication is an important part of that.”

The amount Google spends on lobbying is a fraction of firms such as General Motors, Verizon and Boeing. But it’s a major shift for a company that has criticized politics as usual and the give-and-take relationships between lawmakers and companies.

In 2005, when Google launched its Washington office, it promised to do things differently by being more of an evangelist of ideas and using white papers and panel discussions, rather than being a bare-knuckled corporate brawler and gaining business favors through political donations and traditional lobbyists.

“There is the kind of lobbying where you pay an ex-senator to get the current senator to write a sentence into a bill,” Schmidt said in an interview with The Washington Post last fall. “We wanted to lobby based on ideas.”

Google’s first D.C. employee, Alan Davidson, came from a public interest think tank, the Center for Democracy and Technology. The laid-back approach of executives didn’t win over government officials. When co-founder Sergey Brin knocked on Capitol Hill offices in jeans and sneakers, he couldn’t get big meetings.

As Google’s business interests in Washington grew and scrutiny increased, officials here struggled to persuade disinterested executives in Mountain View, Calif., to expand its office and hire more outside lobbying firms.

The turning point came in late 2010, when European regulators began an investigation into claims that the search giant was unfairly pushing down the results of competing Web firms. Soon after, the Justice Department launched an antitrust investigation. Last summer, the Federal Trade Commission charged Google with violating user privacy and reached a settlement with the firm to strengthen its privacy policies.

“Europe was a big moment. People like Eric knew this was going to be a big area early, but the company lagged,” said a person familiar with matter, who spoke on the condition of anonymity because the business decisions were private. “The growth curve of the company was well beyond the growth of the D.C. office.”

Now it’s playing catch-up and drawing from corporate America’s Washington playbook. Google is deploying public relations campaigns while hiring dozens of outside lobbying firms. In addition to bringing on people from both sides of the political aisle, the company is putting money into third-party groups, such as NetCoalition, to defend its interests.

“Coalitions or third-party groups have been around forever and are used for companies that want to wrap themselves in the cloak of a grass-roots or populous campaign or movement,” said Sheila Krumholz, executive director of the Center for Responsive Politics, a group that advocates for transparency in campaign finance and lobbying. “And it’s very difficult to determine how these groups are being funded.”

It might need that ammunition as it faces Washington’s ire.

Lawmakers, state attorneys general and consumer groups have called for the FTC to stop Google from launching its new privacy policy. Customers who sign into their Google accounts won’t have the choice to opt out.

Google was also recently accused of circumventing the privacy settings of mobile phone browsers to collect information about users.

And over the past year, industry officials said, Google was reluctant to adopt the White House proposal to create a “Consumer Privacy Bill of Rights.” It curried favor with government regulators by agreeing to a self-regulatory program that would limit only some collection of information.

Tech firms emphasized that the do-not-track program will be enforced by the FTC. Google said it was not opposed to the technology. It was waiting for the industry to agree on a common response to a do-not-track request, and once broad agreement was reached, Google said, it was happy to join the effort.

“This was a win for Google. It was able to pick the better of two evils,” said an industry official who spoke on the condition of anonymity because negotiations with government officials on the proposal were private.

Some analysts are skeptical that anything short of mandatory rules will protect consumers’ privacy.

“These companies’ track records on privacy do not instill confidence that they are the appropriate guardians of consumers’ privacy,” said T. Barton Carter, a professor at Boston University’s College of Communication.

“In fact, the government’s actions may actually reduce the likelihood that real privacy protection can be achieved because they will reduce the political pressure for serious privacy legislation, including a do-not-track law,” Carter said.