BEIJING — The Chinese legislature decided Thursday to revise the country’s environmental protection law to allow for stricter punishments against companies or individuals caught polluting the environment, according to a report by Xinhua, the state news agency.

The revised law, which is expected to take effect on Jan. 1, 2015, has 70 articles while the current one has 47, and the changes are the first to the law since it was adopted in 1989. Under the new law, fines against companies would be greater, and company executives deemed responsible for pollution could be detained for up to 15 days. Local officials who cover up for polluting companies can be demoted or fired. Companies that have been ordered by officials to stop polluting but avoid doing so can be penalized with fines that accumulate daily. Until now, the companies had been assessed a one-time fine, Xinhua reported.

The legal revisions were approved Thursday by the National People’s Congress, a legislative body that generally agrees to policies already made by Communist Party leaders. Li Keqiang, China’s prime minister, has said that China is ready to “declare war” on pollution.

Chinese officials trying to protect the environment have for many years had a difficult time ensuring enforcement of the environmental protection law. On Tuesday, the Ministry of Land and Resources released a report that said nearly 60 percent of areas being monitored had “very poor” or “relatively poor” underground water quality in 2013.