The net's most powerful company has had a difficult relationship with America's intelligence agencies - but the threat of Chinese interference means it is now choosing sides

We all know that conflicts can produce some unlikely bedfellows, but as Google continues its battle with the Chinese authorities, it appears that another unlikely alliance is being forged.

According to this report in the Washington Post, Google has now turned to one of its fiercest enemies - America's National Security Agency - to try and protect itself from interference.

The NSA - the group charged with conducting surveillance and codebreaking for the US government - is said to be working with Google to help it understand and analyse recent attacks by hackers said to be based in China.

On the surface, this might not seem like a big deal - after all, American companies have not been shy about asking the government for help over the last couple of years. But in truth, it marks a sharp turnaround in Google's often tense relationship with the Washington over surveillance issues.

In 2006, the search engine's boss, Eric Schmidt, criticised the US government for invading people's privacy when it tried to gain access to records that detailed the online habits of millions of people. While other search engines capitulated to the request, Google refused and took the issue to court - eventually getting a federal judge to rule that the request was illegal.

"This was a complete violation of our users' rights," said Schmidt later that year, during a talk in San Francisco that felt very clearly like he was flexing his muscles. "We, as a society, came to a rational outcome - and if we don't like it, we can replace the people who pass those laws."

The NSA's recent history has been inglorious: warrantless wiretapping scandal still continues, as well as allegations that it monitored internet use by customers of America's biggest telecoms company, AT&T.

While safeguards are apparently being put in place to prevent the NSA from accessing private data during its work with Google - the Washington Post story says that "the alliance is being designed to allow the two organizations to share critical information without violating Google's policies or laws that protect the privacy of Americans' online communications" - the antagonism between the two organisations has been palpable in the past.

But today's reports show a different approach to relations between the NSA and Google. Why?

The first - and most obvious - difference may simply be one of politics. The White House then was ruled by George Bush and Dick Cheney; these days it is Obama who runs the show. Schmidt's close links to the president are well-known (he acted first as a campaign adviser and is now a member of the president's science and technology committee) and perhaps he does not feel the same antipathy any more.

If that's true, it could be misplaced: the American intelligence agencies - like Britain's civil service - change little between administrations, and are often accused of following their own agenda despite ultimately reporting to the Oval Office.

Secondly, it is possible that working with the NSA may help Google in other areas, such as putting the dampener on possible antitrust investigations. Schmidt already stepped down from a directorship at Apple amid concerns about potential conflicts of interest, but that did not stop regulators from continuing their investigation.

The third reason, however, is much more pragmatic: simply that Google is now under threat from an entity more powerful than it bargained for. For all the company's huffing and puffing recently, the Chinese government is a beast that cannot seem to be cajoled or controlled.

And though there is talk of Google as a nation in its own right - the logical end point of corporate capitalism, perhaps - it's still clear that some things are beyond the reach of companies, however rich and powerful they may feel.

By turning to the US government, Google appears to have weighed up its options and decided that protecting itself is better than engaging in a vendetta with Washington. In many ways, it is a tip of the hat to Hillary Clinton, who gave tacit support for Google during a speech on internet foreign policy a couple of weeks ago.

"New technologies do not take sides," she said. "But the United States does."

Now it looks like Google is doing the same.