German Chancellor Angela Merkel stressed the role of an independent judiciary and the need for a level playing field for foreign firms as she begun her ninth trip to China since taking office.

Merkel arrived in China on Sunday amid growing pressure from industry and rights groups to confront the Chinese more forcefully.

The Chinese government is overseeing a broad crackdown on rights groups and activists, and is facing complaints from foreign firms about market access restrictions.

Speaking to students at a Beijing university, Merkel explained the importance of real rule of law.

"This means the judiciary decides according to the laws and legislation of the country independently of politics, and everyone is equal before the law. That means court procedures and rulings have to be transparent," she said.

"If interpreted in this way, rule of law strengthens the trust of citizens in state institutions and its decisions. And thereby also strengths the social stability of a country."

China's courts are controlled by the ruling Communist Party, though President Xi Jinping is trying to improve the rule of law and get ordinary people to resolve their grievances via the courts rather than taking to the streets.

Foreign companies also need a good legal framework, Merkel added.

"As we see it, a legal framework for companies also has to be designed in such a way that foreign companies enjoy the same rights and privileges as domestic companies, for example as regards public tenders, the effective protection of brands and patents and data."

Merkel's trip also comes in the midst of anger in Europe about Chinese steel exports, the robust growth of which has come under fire from global rivals, who have accused China of dumping cheap exports after a slowdown in demand at home.

"We have to ensure that we have a level playing field," she said, referring to the steel issue.

"No one wants to see an expanded trade war between the European Union and China. But that means we have to talk about the outstanding issues."

Meanwhile, the two nations have agreed to set up an "early warning system" to avoid problems for German non-governmental organizations from a new Chinese law that restricts such groups, Merkel said on Sunday.

She told reporters that she and Chinese Premier Li Keqiang had agreed to stay in close touch about potential issues once the new law goes into effect on Jan. 1.

The law grants broad powers to Chinese police to question NGO workers, monitor their finances, regulate their work and shut down offices. German rights groups and political foundations have said they fear that the law will hamper their work.

Merkel said Chinese officials had agreed that the work of the NGOs benefited both sides, and it was important to avoid negative consequences from the new law.

"That is why we ... agreed to be in close touch with each other via the foreign ministries or other organizations. I think that is the right way to react initially," Merkel said.