Kawasaki on Thursday passed an ordinance against hate speech and, in a first in Japan, violators can be slapped with criminal penalties.

The new ordinance enacted at the Kawasaki Municipal Assembly, which will enter into force on July 1, bans discriminatory language and actions against foreign people in public spaces in the city. It makes repeat violations punishable by a fine of up to ¥500,000.

While Japan enacted a law designed to deter hate speech in 2016, the city concluded that the law has been ineffective in eradicating discrimination against ethnic minorities, as it lacks provisions to ban or punish the use of discriminatory language.

Kawasaki, home to one of the largest Korean communities in the greater Tokyo area, seeks to effectively fight discrimination with the ordinance by giving specific examples of what it is trying to stamp out.

Actions specified include calling for minorities to be expelled from where they live, encouraging physical attacks against them and pejoratively referring to them as something other than a human.

Under the ordinance, the city can issue advisories to violators and orders to those found to be repeat offenders. If they do not adhere to the orders, the city can disclose their names and addresses, and file criminal complaints against them.

Each step is taken after a hearing in front of a board of review, and the advisories and orders are limited to six months to address concerns over freedom of expression.

Kawasaki Mayor Norihiko Fukuda first indicated in June that the city would introduce criminal punishments in order to strengthen measures to rein in hate speech.

Hate speech targeting ethnic minorities in Japan has included threats to kill people of certain nationalities and severe insults or remarks.