US President Barack Obama Monday pushed for an unshackled Internet and expanded political freedoms, seeking to get around China's media curbs with a webcast town hall event in booming Shanghai.

Obama also said the United States and China, two economically interlocked rivals, need not be adversaries, appealing to millions of Chinese web surfers on the first day of his first visit to what he termed "a majestic country".

"I have always been a strong supporter of open Internet use. I am a big supporter of non-censorship," Obama said, before flying to Beijing for a welcome dinner and talks with Chinese President Hu Jintao. Obama's Shanghai speech

"I think that the more freely information flows, the stronger a society becomes," said Obama in a nation where communist authorities have for months blocked Internet sites such as Twitter, YouTube and Facebook.

Obama's decision to tap the power of the web was symbolic: the grassroots movement that powered his capture of the White House in 2008 was largely built on Internet freedoms restricted by the "Great Firewall of China".

But it was unclear how many Chinese actually saw the event, as it was not televised nationally -- though was shown on Shanghai local television -- and was only carried as a live transcript on the website of state agency Xinhua.

On Chinese state television's evening news, Obama's visit was not even mentioned until 25 minutes into the broadcast. Xinhua's main dispatch on the Shanghai event did not include Obama's comments on Internet freedoms.

The White House streamed the event live on its website but officials did not immediately say how many Chinese web surfers logged on.

The president fielded questions from his audience of university students as well as Internet users, speaking on subjects ranging from "universal rights" and Taiwan to Chinese NBA basketball star Yao Ming.

Audience members, while showing great respect for Obama, rarely asked questions deviating from the official Chinese government line, and the forum appeared tightly controlled by the authorities.

The most interesting question -- on Internet freedoms -- came via email, and was read out to Obama by the US ambassador to China, Jon Huntsman.

Having been accused of downplaying rights concerns to appease China, Obama called for the observance of "universal rights" of political expression, religious freedom and free information everywhere.

"They should be available to all people, including ethnic and religious minorities, whether they are in the United States, China, or any nation," Obama said, though he noted that his own country was not perfect.

But the US leader did not specifically mention sensitive issues like China's rule over Tibet, after declining to meet exiled spiritual leader the Dalai Lama in the United States before making his high-profile inaugural visit to Beijing.

"The notion that we must be adversaries is not predestined," Obama said, walking a fine line between standing up for US interests on trade and human rights and seeking Chinese backing on issues such as Iran and North Korea.

He leavened his call for expanded freedoms with praise for China as a "majestic country", marvelling at the "soaring skyscrapers" of Shanghai and the relics of China's "distant past" he hoped to see in Beijing.

China's communist authorities were taking no chances on security, with roads leading to the venue at Shanghai's imposing Science and Technology Museum closed to normal traffic and uniformed security agents deployed en masse.

The authorities also apparently kept close control on the students allowed to attend the meeting, selected by professors at Shanghai-area universities.

Obama later boarded Air Force One and flew to Beijing, where he arrived at the Diaoyutai state guest house for dinner with Hu, his motorcade sweeping past Tiananmen Square and the gates of the Forbidden City on the way. 70 percent of Americans see China as economic threat: poll

US Secretary of State Hillary Clinton, Commerce Secretary Gary Locke, National Security Adviser General James Jones and other top officials joined Obama for the dinner, which included Chinese prawns and lamb chops, the White House said.

On Tuesday, China will lay on the lavish pageantry of a state dinner, after a fresh round of talks for Obama and Hu.

Tough talk on the economy was looming.

A Chinese commerce ministry spokesman Monday accused the United States of increasing protectionism and said American calls to let the yuan rise were "unfair".