A court in China's Shaanxi Province has denied divorce for a woman claiming she was beaten and scolded by her husband for the past 40 years.

In its decision, the court told the woman to "enjoy and cherish the twilight years of her marriage and to keep her family whole."

The debate over marriage and divorce in China is heating up after the passing of new changes to the country's civil code. One of the changes, approved during the 2020 National People's Congress, requires couples to take a "month-long-cooling-off" period before their divorce is finalized.

The "divorce cooling-off period" policy, which will come into effect Jan. 1, has drawn much criticism. Arguments from both sides have flared on social media. Supporters said the policy would give couples a chance to reevaluate decisions and might prevent the breakup of some families.

Those against the policy say the recent verdict to deny the divorce of the abused woman in Shaanxi was an example of how women were denied freedoms. The woman, surnamed Li, claimed her husband continually beat her but she had to put up with the abuse for the sake of her three children.

In the court filing, the husband contested the divorce. The husband, surnamed Yang, admitted he was in the wrong but claimed he never "cheated on his wife." In the court proceedings, the husband said he hoped to reunite with his wife and for her to give him another chance.

The court said the couple should work better to strengthen their communication to resolve conflicts. It added that couples should "understand each other" to create a "harmonious and happy family."

Social media said recent changes to the country's civil code were proof of oppression against women. Detractors said women should be able to divorce if they had valid reasons.