Google is back in business in China, with the government confirming that it agreed to renew the internet giant's licence.

In last few months Google's future in the communist country was threatened by a lengthy dispute over its anti-censorship principles.

But in a surprising turn around the internet giant has agreed to censor content appearing on its pages and abide by Chinese law.

Google's licence in China will continue to run for at least a year, after the company pledged not to run law breaking content.

The approval came after the internet giant ceased automatically redirecting queries from mainland China to a version of its search engine it does not censor in Hong Kong.

Silicon Valley analyst Rob Enderley says China was never going to compromise on the issue of political censorship.

"Well, China wanted the right to censor the search results that Google was providing specifically with regard to anything that was critical of the Chinese government, anything that spoke about any past large scale demonstrations against that government," he said.

"That was the kind of thing that the government absolutely objected to Google providing access to, that information [which] is blocked generally in China.

"Google disagreed and that was the nature of the dispute."

Mr Enderley says the Chinese government has traditionally used heavy censorship to control political unrest in the country.

"The ability to censor information inside of China is something that the Chinese government is very adamant about," he said.

"They believe that certain kinds of information can incite riot and historically regime change in China has come at the result of very costly in terms of lives or revolutions.

"And so the government is very aggressive in terms of trying to prevent that kind of activity and part of their tool kit is restricting communication to information that they in fact approve, so that was something that the Chinese government was not going to bend on."

Vital market

Mr Enderley says the backflip was inevitable as China represents a vital market for the search provider.

"I think the realisation that being locked out of China was going to relegate Google into a second class player in their own market... and once you dominate a market you can't afford to be considered second class," he said.

"They were losing rather badly to Badu which is the dominant search provider in China but China is perhaps the fastest growing and potentially going to be the largest economic power in the world and so for Google's future, China is critical.

"No company wants to be perceived as becoming obsolescent and losing the Chinese market would have put Google on that path."

The analyst says the backdown shows Google accepts its commitment to freedom of information is untenable if it wants to have a presence in China.

"Well, that is the stance they took was probably one that they were going to have to bend on. Like any country, you have to conform to the laws of the land much like you do in Australia or in the United States and you are not given the option of accepting the laws you like and rejecting the ones you don't," he said.

"Google appears to be learning that lesson the hard way but they now appear to be conforming to the laws in China."

He says the deal may have saved the relationship between the internet giant and the Chinese government, which in recent months had dramatically deteriorated.

"They were in the process of getting thrown out of China and barred from that country. It was getting pretty close to perhaps taking action against Google employees in China, maybe seizing some Google properties," he said.

"You don't mess with the government and Goggle was getting dangerously close to having China use them as an example and it looks like they may have fallen short of that."