President Obama nudged China to stop censoring the Internet on his first-ever trip to the communist-ruled country, after he was posed a question Monday about Twitter, apparently selected by a U.S. reporter. 

The president touched on the sensitive issue at a town hall meeting with students in Shanghai. The question, one of nearly 1,200 that were submitted through the U.S. Embassy Web site, asked whether the Chinese should be able to use Twitter freely. 

"I think that the more freely information flows, the stronger the society becomes, because then citizens of countries around the world can hold their own governments accountable," Obama said. "They can begin to think for themselves." 

Before answering, Obama explained that the question was selected by a member of the U.S. press corps -- presumably to give the impression that the White House had no hand in choosing it. White House spokesman Nick Shapiro later explained that Edwin Chen, a Bloomberg reporter and president of the White House Correspondents' Association, picked the questions at random. 

"The Internet questions were numbered and Ed picked a number -- the corresponding question was asked," he told Fox News. 

More On This...

Chen later confirmed that he selected a few questions, saying that the U.S. Embassy was concerned about picking them and wanted an independent party to step in. Chen said the Twitter question was the only one picked randomly by him. 

Reporters in Shanghai for the town hall had very limited access to social networking sites like Facebook and Twitter, which the White House itself uses to promote its agenda. 

Just hours ahead of talks with Chinese President Hu Jintao, Obama tried to find a political balance, couching his admonitions with words of cooperation, praise and American humility. He said few global challenges can be solved unless the world's only superpower and its rising competitor work together, and he insisted: "We do not seek to contain China's rise." 

But in his opening statement and in answers to the wide-ranging discussion with university students, Obama spoke bluntly about the benefits of individual freedoms in a place known for limiting them. 

"We do not seek to impose any system of government on any other nation," Obama said. Then he added that freedom of expression and worship, unfettered access to information and unrestricted political participation are not principles held by the United States; instead, he called them "universal rights." 

The line offered echoes of Obama's predecessor, George W. Bush, who often talked of the "universality of freedom." Obama talked at length about the Internet, which he said helped him win the presidency because it allowed for the mobilization of young people like those in his audience in Shanghai. 

"I'm a big supporter of non-censorship," Obama said. "I recognize that different countries have different traditions. I can tell you that in the United States, the fact that we have free Internet -- or unrestricted Internet access is a source of strength, and I think should be encouraged." 

Given where Obama was speaking, such a comment carried strong implications. He appeared to be talking directly to China's leaders when he said that he believes free discussion, including criticism that he sometimes finds annoying, makes him "a better leader because it forces me to hear opinions that I don't want to hear." 

China has more than 250 million Internet users and employs some of the world's tightest controls over what they see. The country is often criticized for having the so-called "Great Firewall of China," which refers to technology designed to prevent unwanted traffic from entering or leaving a network. 

Obama's town hall was not broadcast live across China on television. It was shown on local Shanghai TV and streamed online on two big national Internet portals, but the quality was choppy and hard to hear. 

Obama is in the midst of a weeklong Asia trip. He came with a vast agenda of security, economic and environmental concerns, although always looming was how he would deal with human rights while in China. 

The president left Shanghai after the event and landed a couple of hours later in Beijing on a cold afternoon. 

His China visit features the only sightseeing of his journey. He will visit the Forbidden City, home of former emperors in Beijing, and the centuries-old Great Wall outside of the city. Aides have learned that finding some tourist time calms and energize their boss amid the grueling schedule of an international trip. 

U.S. ambassador Jon Huntsman called Obama's event the first ever town-hall meeting held by a U.S. president in China. Yet former presidents Bill Clinton and George W. Bush also spoke to students and took questions from them during stops in China. 

China is a huge and lucrative market for American goods and services, and yet it has a giant trade surplus with the U.S. that, like a raft of other economic issues, is a bone of contention between the two governments. The two militaries have increased their contacts, but clashes still happen and the United States remains worried about a dramatic buildup in what is already the largest standing army in the world. 

Amid all that, Obama has adopted a pragmatic approach that stresses the positive, sometimes earning him criticism for being too soft on Beijing -- particularly in the area of human rights abuses and what the United States regards as an undervalued Chinese currency that disadvantages U.S. products. 

The two nations are working together more than ever on battling global warming, but they still differ deeply over hard targets for reductions in the greenhouse-gas emissions that cause it. China has supported sterner sanctions to halt North Korea's nuclear weapons program, but it still balks at getting more aggressive about reining in Iran's uranium enrichment. 

Obama recognizes that a rising China, as the world's third-largest economy -- on its way to becoming the second -- and the largest foreign holder of U.S. debt, has shifted the dynamic more toward one of equals. For instance, Chinese questions about how Washington spending policies will affect the already soaring U.S. deficit and the safety of Chinese investments now must be answered by Washington. 

The White House hoped Monday's town hall meeting with Chinese university students would allow Obama to telegraph U.S. values -- through its successes and failures -- to the widest Chinese audience possible. 

But those hopes had their limits in communist-ruled China. 

Fox News' Kelly Chernenkoff and The Associated Press contributed to this report.