China’s National People’s Congress passed a law, going into effect on Tuesday, prohibiting any speech or behavior that desecrates “the deeds and spirit of the heroes and martyrs” of the Communist Party.

The Global Times, a state-run publication, argues that the law is necessary and that “placing strict limits on expression and actions when it comes to national dignity has nothing to do with freedom of speech.”

Tuesday marks the communist holiday International Workers’ Day, or “May Day.”

The text of the law echoes that of some Islamic countries that prohibit general defamation against Muhammad and Islam. According to state outlet Xinhua, the law creates unspecified “punishments” for individuals found to be dishonoring “heroes and martyrs,” who are not individually named but identified only as those who have sacrificed for China and the Communist Party. It also “allows family members of heroes and martyrs to file lawsuits, and entrusts prosecutors to file public interest litigation cases against activities defaming heroes and martyrs.”

The final major punitive measure in the law is to hold internet sites and service providers responsible for removing content that the Communist Party finds unsavory as soon as possible.

In addition to punitive measures, the law will force memorial sites for wars and major events to open for free and hold “activities to commemorate and educate.” In schools, teachers will be expected to implement “a whole new level of patriotic education,” according to Nanjing Massacre Memorial Hall curator Zhang Jianjun.

The law decrees that September 30 will be observed as “Martyrs’ Day of Remembrance” with a procession in Tiananmen Square to honor “martyrs,” presumably not the martyrs of the Tiananmen Square massacre, which the Chinese government has censored out of existence within its borders.

Relatives of the “martyrs” will also receive “bereavement benefits and preferential treatment” in “such as education, employment, eldercare, housing, and medicine.”

Public declarations do not specify what the punishments and rewards the law will provide. The regime of Communist Party leader Xi Jinping has, for years, worked on the development of a “social credit system” that will likely prove useful in monitoring this behavior. The system will designate points to all Chinese citizens; citizens can either win or lose points based on whether they behave in ways that please the Communist Party. Individuals whose score is too low will be banned from trains, airports, and other travel, and may lose some public benefits.

Xinhua states that officials believe the law is necessary “to promote patriotism and socialist core values in China.”

“The country and the people should forever respect and remember the heroes and martyrs for their sacrifice and contribution to the Chinese nation and the people, according to the law,” Xinhua reports.

The Global Times explains the impetus for this law: “recent incidents” in the government caught Chinese citizens wearing Japanese World War II army uniforms in private. The individuals in question posted the photos online, triggering police action. The Chinese Communist government continues to regularly condemn Japan for its violence during World War II. Those who admire the fashion of imperial Japan, the Times argues, “are spiritually standing on the side of fascist invaders.”

The newspaper laments that, in one case of Japanese army role-playing, the people in question were “only detained for 15 days, a punishment seen by many as too light.” This implies that the unspecified punishments in the new law will be harsher than short imprisonment periods.

The law is the latest in a series of measures meant to curb the little freedom of speech still available in China. The nation recently passed a law prescribing prison sentences for people who “disrespect” the national anthem by singing it or playing it in “inappropriate” places, however Beijing defines the term. China has also increased monitoring of social media at home and abroad, applauding international corporations that have taken to self-censorship to protect business interests in China.

In one notable incident, Chinese officials demanded that the American hotel chain Marriott fire an American worker for liking a tweet posted by the account “Friends of Tibet;” Marriott accepted Beijing’s request almost immediately, issuing an extensive apology for insulting the sensibilities of the Communist Party of China.

Follow Frances Martel on Facebook and Twitter.