The deputy mayor of Tokyo's Shibuya Ward resigned on Tuesday after facing criticism for mocking a female local assembly member as "pig" in an online workplace chat.

Shin Sawada, 63, issued a statement apologizing to Yukiko Kuwazuru, a 35-year-old rookie ward assembly member, for his "inappropriate" posts that "severely damaged" the municipality's reputation.

Shibuya Ward is known for promoting gender equality and diversity, becoming one of the first local governments in Japan to issue certificates recognizing same-sex partnerships as being equivalent to marriage.

According to the municipality, the chat in question was joined by about 120 people, including senior ward officials.

Shibuya Ward assembly member Yukiko Kuwazuru (C) speaks at a press conference in Tokyo on Aug. 7, 2023. (Kyodo)

In June and July, Sawada posted messages slandering Kuwazuru, who belongs to the Democratic Party for the People, such as by calling her "Kuwa-buta." "Buta" means pig in Japanese.

He has also called an assembly committee to which Kuwazuru belongs as a "group of idiots."

Kuwazuru told a press conference in Tokyo on Monday that she was emotionally hurt and "struggling." She also said Sawada exposed in the chat her residence address that was not made public.

The incident has come to light by an anonymous whistleblower who claimed to be an official of Shibuya Ward. Sawada was serving his second term as deputy mayor of the ward and also had experience working at major advertising agency Hakuhodo Inc.

Shibuya Mayor Ken Hasebe also apologized on Tuesday, while criticizing Sawada's remarks as "lacking consideration" and "unacceptable."

The mayor also said he instructed workers in the office to "act responsibly as civil servants" to prevent similar incidents from happening again.