After a string of softball questions from officially selected students, Ambassador Jon Huntsman read out a question that someone had sent in to the US Embassy website, asking bluntly what the president thought of Internet censorship in China.
Taking advantage of this end-run around Chinese government efforts to control all aspects of the supposedly unscripted event, Mr. Obama stressed that he had "always been a strong supporter of open Internet use" and "a big supporter of non-censorship."
His response – faithfully transcribed onto the website of the official state news agency, Xinhua – was immediately posted prominently on all four major Chinese web portals, drawing delighted reactions from some readers.
"An open country, a great president and an immortal assertion; we still have a long way to go" wrote one netizen signing himself Jiangzhongshan on Sohu.com.
It was never going to be easy in China, where officials prize predictability, to organize the sort of spontaneous discussion on live TV that Obama has made part of his political repertoire.
The White House had envisioned an unmoderated dialogue between the president and some 1,500 students asking whatever they wanted, broadcast on national television here. After a fortnight of tortured negotiations with Beijing, the US settled for a scaled-down version involving about 400 Chinese students and questions from the Internet, broadcast only on local Shanghai TV, a Hong Kong station, and on the Web.
But only determined viewers would have succeeded in following the event. Whitehouse.gov, which live streamed the meeting, was unreliable in Beijing, and though the White House Facebook page also carried it, Facebook is blocked in China, along with other social networking sites such as Twitter and YouTube.
It did not exactly allow the US president to reach out directly and touch the Chinese people's hearts, but the official Xinhua news agency carried a real-time transcript of the proceedings on its website.
Xinhua also did not flinch from the pointed references to freedom that Obama made in his introductory remarks. "These freedoms of expression and worship, of access to information and political participation, we believe are universal rights," the president said, referring to four rights curtailed in China.
The questions, though, asked by members of the audience or sent in to a government website, did not pose much of a challenge to Obama – or to Chinese censors. Topics included Obama's hometown, Chicago, his Nobel Prize, US policy in Afghanistan, and what he hopes to achieve on his current visit to China.
The students attending had clearly been vetted and their questions approved by the Chinese authorities. Two of the four questions from the audience came from student officers of the Communist Youth League, it transpired later.
Still, Obama's support for freedom of expression – even if it came in response to a planted question – inspired one viewer.
"I shall not forget this morning" Twittered @philfenghan. "I heard, on my shaky internet connection, a question about our own freedom which only a foreign leader can discuss."