Michelle Obama has declared that access to the internet should be a universal right, in a rare and controversial foray into the world of international politics during a cultural visit to China.

The US first lady, who is on a week-long trip to the communist state with her daughters and mother, risked upsetting her hosts in Beijing by declaring access to information as a birthright. During a speech at Peking University's Stanford Centre, she called for greater freedoms while refraining from a direct attack on the controls over information in China.

The so-called "great firewall of China" blocks access to internet sites deemed sensitive, while a vast censorship machine swiftly deletes content considered objectionable. Twitter and Facebook are both blocked.

Obama told a crowd of about 200 students, most of whom were from the US: "It is so important for information and ideas to flow freely over the internet and through the media. My husband and I are on the receiving end of plenty of questioning and criticism from our media and our fellow citizens, and it's not always easy. But I wouldn't trade it for anything in the world."

She added: "When it comes to expressing yourself freely, and worshipping as you choose, and having open access to information – we believe those are universal rights that are the birthright of every person on this planet."

Chinese students in the audience reportedly thronged around the first lady after her speech, taking pictures with their cellphones. Nevertheless, American newspapers reported that several students declined to discuss the rights section of Obama's speech.

When asked about universal rights, Mary Yan, 23, an English student at Peking University, was reported as saying: "It was quite enlightening to hear about her experience and her struggle. But it's not convenient for me to talk about such issues."

However, Obama's comments will also be seen as a criticism of the Turkish prime minister, Recep Tayyip Erdogan, who announced restrictions on Twitter last week.

The Turkish state tried to block the micro-blogging site after some users in recent weeks posted voice recordings and documents purportedly showing evidence of corruption among Erdogan's inner circle. Turkey said that action had been taken against Twitter as a "protection measure".

The US frequently criticises China's human rights record, including its lack of protection for freedom of speech, but before her trip the White House had stressed that America's first lady would avoid sensitive subjects.

Obama, a Harvard-educated lawyer, is focusing on promoting education and cultural ties, and will visit the Great Wall, the historic city of Xi'an, and the southern city of Chengdu along with her family.

Her three-city tour marks only the third time that Obama has made an overseas trip without her husband since the family moved into the White House.

Former US first ladies Laura Bush and Hillary Clinton have both criticised other countries' human rights records on trips abroad while their husbands were in office. The American ambassador to China, Max Baucus, also touched on internet freedom in remarks to the students before Obama's speech. "Between texting, Twitter, Facebook, and Snapchat we're all interconnected," he said, describing how technology enables better communication between cultures.

Obama also met Chinese president Xi Jinping on the first day of her tour. The formal meeting occurred in a state guesthouse and included Xi's wife, Peng Liyuan, who has an unusually high profile in China where the spouses of leaders generally stay hidden.