Japan’s Supreme Court upheld Wednesday a law requiring married couples to have the same surname, despite campaigners calling the provision a violation of women’s rights. Opponents of the law have called it discriminatory because most couples in Japan use the husband’s name, the BBC reported.

The issue has become controversial in Japan, as those advocating for women’s rights have clashed with conservatives who say shared names are a central aspect of the family unit. The court’s ruling came in a case filed in 2011 by five plaintiffs who said the law places a burden on working women who choose to use their own name professionally but must use their legal married name on official documents, The Telegraph reported.

The decision comes as Japanese Prime Minister Shinzo Abe has been trying to bring more women into the country’s shrinking workforce, although his party opposed changing the law, which dates back to Japan's 19th Century Meiji era. Justice Itsuro Terada said maintaining a single family name is “deeply rooted in our society” and “enables people to identify themselves as part of a family in the eyes of others,” according to the Japan Times.

Japan’s law does not state which name a couple must take when they get married, but studies cited by the Japan Times showed 96 percent of Japanese couples have chosen the husband’s name over the past 40 years. In his decision, Terada said women who are concerned about the potential disadvantages of changing their name to match their husband could still use their maiden names in everyday life, a sentiment that ignored the plaintiff’s concerns about complications resulting from using two names.

Women in Japan were originally allowed to keep their own names after marriage, but the current law was put in place in 1898 as part of a feudal family system where men controlled all women and children in their household, the BBC reported. The feudal system was abolished in 1948 but the surname law stuck.

The country’s Supreme Court also ruled Wednesday that a law prohibiting women from remarrying within six months of getting divorced was unconstitutional. That law also dated back to the 19th century, and Terada said it represented an “excessive restriction” on a woman’s freedom to marry, the BBC reported. However, the court rejected that plaintiff’s request for compensation for emotional damages and left open the possibility of a law requiring a shorter waiting period.