Manga comics and anime films with extreme depictions of rape, incest and other sex crimes have been restricted in Tokyo, in spite of industry charges of censorship.
An amended ordinance passed by the Tokyo metropolitan government says that under-18-year-olds must not be able to buy or rent materials that depict such sexual acts in "unjustifiably glorified or exaggerated ways".
The bill demands that the industry self-regulate to enforce the restriction.
Tokyo Governor Shintaro Ishihara has long campaigned against "unhealthy" manga and anime in the city of over 13 million people, but failed earlier this year with a plan to restrict material that depicts apparent underage sex.
A group of 10 major comic publishers has protested against the latest bill and vowed to boycott collectively the biggest industry show, the Tokyo International Anime Fair, to be hosted in March by the conservative governor.
Japan's centre-left Prime Minister Naoto Kan weighed in this week, saying on his blog that he wanted all parties in the row "to make efforts to avoid a situation in which the International Anime Fair will be cancelled".
Despite the uproar, a panel of major political parties -- including Kan's Democratic Party and the conservative Liberal Democrats -- this week agreed on the restriction ahead of the vote in the Tokyo metropolitan assembly.
On Wednesday "the assembly at a plenary session approved the revision to the ordinance for the sound upbringing of youth... by a majority vote", said a spokesman of the 127-seat city assembly.
The amended ordinance included a non-binding clause saying the city government would carefully consider a work's artistic and social expression when it starts restricting some works from July 1, Kyodo News reported.
Manga comics are highly popular in Japan with both children and adults.
The graphic novels deal with themes from high school romance to the literary classics -- but also with pornography, much of it hardcore and violent.
Although producing and distributing child pornography is illegal in Japan, its possession is not criminalised, and images of "non-existent" underage characters in manga, anime and video games are legal.