China welcomes foreign Internet companies working in China, but they must respect and abide by the country's laws, including those on expression, the Chinese Foreign Ministry said Thursday.

The comments by ministry spokesman Liu Jianchao followed remarks Tuesday by Google Inc. (GOOG) co-founder Sergey Brin acknowledging the Internet company has compromised its principles by accommodating Chinese censorship demands.

Liu said China took a positive attitude toward working with companies such as Google, but any cooperation must exist "within a framework of law," and that Beijing hoped firms would abide by China's regulations.

Google's Brin said the Internet company had agreed to the censorship demands only after Chinese authorities blocked its service in that country.

Google's China-approved Web service omits politically sensitive information that might be retrieved during Internet searches, such as details about the June 1989 suppression of political unrest in Tiananmen Square.

Its agreement with China has provoked considerable criticism from human rights groups.