China warned Google, the world's largest search engine, against flouting the country's laws on Friday, as expectations grow for a resolution to a public battle over censorship and cyber-security.

The chief executive of Google, Eric Schmidt, said this week he hoped to announce soon a result to talks with Chinese authorities on offering an uncensored search engine in China.

Google has made its case, both publicly and privately, China's Minister of Industry and Information Technology, Li Yizhong, said, but did not confirm directly that his ministry was in talks with Google.

Google in January threatened to pull out of China if it could not offer an unfiltered Chinese search engine, after cyber attacks originating from China on it and about 30 other firms.

If you don't respect Chinese laws, you are unfriendly and irresponsible, and the consequences will be on you, Li told reporters, in answer to a question on what China would do if Google.cn simply stopped filtering search results.

Li complimented Google on having reached about 30 percent market share in the Chinese market since it launched google.cn about three years ago, and said it was welcome to expand market share further if it abided by Chinese law.

It was up to Google whether to stay in China's market or not, he added.

Ministry officials have wavered between confirming and denying that talks are happening at all, in response to repeated media questions during China's annual legislative session.

This is really a hot topic, it's easy and yet not easy to respond. A lot of these matters don't fall under my ministry, Li said.

The Ministry of Industry and Information Technology shares oversight of the Chinese Internet with a number of other bodies, while still more bureaucracies are involved in matters of foreign investment, complicating the Chinese government's response to Google's challenge.

(Reporting by Lucy Hornby and Rujun Shen; Editing by Alex Richardson)