When Google threw down the gauntlet to China's Internet censors, it also challenged the loyalties of the nation's wired generation.

These tech-savvy Chinese in their 20s and 30s grew up in far greater affluence and openness than their parents. Many are pulled between patriotic pride and a yearning for more say over their own lives, even if they accept Communist Party control.

The Google dispute may become a telling test of how they balance loyalties to their country with their desire for unfettered expression and access to information, and this response could shape how Beijing handles the dispute.

The special feature of the Internet is that companies like Google see that expanding their profits is tied to expanding their freedom, said Chen Yongmiao, a Chinese activist whose own website has been restricted by authorities.

It's a test. How much you support Google in China shows how much you want more freedom in China, even if you know Google is ultimately about profits.

The world's biggest search engine said last week it could pull back from China and shut its Chinese Google.cn website over complaints of hacking and censorship.

Chinese officials have avoided directly taking on Google, but made plain they expect Internet companies in the country to enforce the laws, including censorship.

The center of the resulting tug-of-war in attitudes is the Zhongguancun area in northwest Beijing, an area dense with university campuses, malls of high-tech goods and computer labs, and also home to Google's China headquarters.

Students, job-seekers and high-tech professionals in Zhongguancun saw Google's stance through a prism of admiration and wariness that has echoed in online forums.

I think it's admirable for a company to sacrifice profits for the sake of an idea, said Liu Wei, a 29-year-old accountant with heavy Clark Kent-style spectacles and neatly cropped hair.

Why can't we criticize our own government if we want to? Why can't we choose what we read on the Internet?

That's because China's different! interrupted his girlfriend Sun Jingying, a slight 26-year-old studying to become a chartered accountant.

There are some things about this country we just have to accept, she added, nonetheless stressing she would be sad if Google quit China. I'd love to work for them, she said.

The Obama administration has shown it wants to court this emerging generation of connected Chinese. China's latest survey of Internet use found 60.4 percent of the nation's online population of 384 million was aged 10 to 29.

During his visit to China last November, President Barack Obama used a web-cast meeting with Chinese youth to amplify that message, telling them he was a big supporter of not restricting Internet use. U.S. Secretary of State Hillary Clinton is set to take on China and other authoritarian governments over Internet restrictions in a speech on Thursday.

Despite censorship, China's Internet can be a potent public forum, with bloggers and amorphous online groups hectoring the government over pollution and corruption.

Last year, the government abruptly abandoned a plan to force all new personal computers to come with a copy of Green Dam Internet-filtering software that had been derided by online critics as intrusive and ineffective.

But China's youth can also bristle at what they see as Western bullying. The ruling Communist Party could seek to channel that volatile sentiment to blunt foreign pressure over control of the Internet.

There are some who feel increasingly restricted and unfree, the ones who tend to support Google. But there are also many who have been heavily shaped by the official media and see the U.S. government behind Google's actions, Li Yonggang, an expert on society and the Internet at Nanjing University in east China, said of the nation's post-80 generation.

If this becomes a more open fight between the Chinese and U.S. governments, this nationalism could come to dominate if the government turns harder line.

FROM BACKLOT TO HIGH-TECH HUB

Chengfu Street in Zhongguancun, where Google has its China headquarters, is testament to the country's economic upheaval.

A little over a decade ago, this was a gritty neighborhood of low brick homes and cheap restaurants near retreating farmland.

Now it bristles with high-tech offices and cafes and restaurants catering to office workers and students. Google's office sits in steel and glass towers that also house a Deutsche Bank office, a gym and Wall Street English classrooms.

The students on nearby campuses who fill many high-tech jobs in this area, however, are also products of an education that prizes pride in the nation's achievements, obedience to the Communist Party, and vigilance against foreign pressure.

Many of them had scant understanding that Google has said China was the source of sophisticated hacking -- China's state-run media has reported little on that complaint -- and others scoffed that Google would leave the country over the issue.

If they can't handle hackers and censorship, that's their own problem, said one Chinese computer hardware technician heading for a gym workout near the Google office. He gave his English name, Derek Huang.

Each country has its own Internet restrictions, so it's natural for us to have our own, and if we want to change them, that's our own business, he said.

Recent opinion surveys show that while Chinese in their 20s and 30s are more critical of their government than older cohorts and want more freedom, they tend to be strongly patriotic and cautious about political change. The United States attracts both admiration and disdain.

The Internet was crucial in spreading Chinese anger about Western protests over Tibet before the Beijing Olympic Games in 2008. In past years, too, the Internet has been a conduit of nationalist Chinese ire over Japan.

Google was just acting out of commercial interests, said Su Xin, a 25-year-old graduate student of aeronautic engineering. I think we've got to accept some restrictions for the sake of stability.

But even some students who said they had little interest in politics said they felt jolted by the idea that Google could quit China over censorship complaints.

If it leaves, I'll feel it's a big loss, said Guo Xin, a 19-year-old student with a spike of hair dyed neon-orange. He said he used the Internet, and Google, to hunt down information about online games and movies.

It's not good restricting us too much. It cuts us off from the information you need in modern life, he said.

(Editing by Megan Goldin)