China has for the first time outlawed sexual harassment and domestic violence, establishing gender equality as a national policy.
For years many Chinese women have suffered in silence
The amendment was passed by the top lawmaking body, the Standing Committee of the National People's Congress.
Women will now be able to take legal action against abusive husbands and those who harass them.
Correspondents say women in China are still far from equal and domestic violence remains a huge problem
Sexual discrimination was supposed to have been abolished in China back in 1949, when Chairman Mao Zedong famously announced that "women hold up half the sky".
But sexual harassment in the workplace is a growing problem, the BBC's Rupert Wingfield-Hayes reports from Beijing.
A national survey of 8,000 women, carried out by Sina.com and Chat magazine, found 79% of female respondents had experienced sexual harassment - compared to 22% of men.
Meanwhile, 40% of women working for private or foreign firms had been targets of harassment compared to 18% of those in state-owned companies, a study by the Chinese Academy of Social Sciences found.
But it will take a lot more than legislation to change deeply ingrained attitudes towards women that go back over two millennia, our correspondent says.
As well as banning harassment, the new law calls on all companies and government agencies to take steps to prevent the occurrence of such cases.
Under the amended law, "gender equality is designated as one of the country's basic national policies", China's official Xinhua news agency reports.