Hamid Mir is a Pakistani journalist and author.

A new law could mark the beginning of the end for Pakistan’s hard-won media freedoms.

In 2009, I set out to broadcast a live show direct from the Swat Valley in northern Pakistan — right after the government had signed a peace deal with the Pakistani Taliban, which controlled the area at the time. But only a few hours before the show, one of my reporter friends, Musa Khan Khel, was gunned down by unknown people in Taliban territory. That evening I led a rally to protest his death. One of the people who came was an 11-year-old blogger by the name of Malala Yousafzai.

She was supporting the right to an education for girls, which was denied by the Taliban. I suggested that she come on my live show and speak her mind. Malala agreed. Within hours, she became a media star.

Back then, thanks to the efforts of many defenders of our democratic institutions, it was possible for the Pakistani media to take a strong, public stand even in places dominated by the Taliban.

Consider the contrast with the present. Today, Malala is a global celebrity. Yet recently the local authorities in Punjab province seized seventh-grade textbooks because they contained pictures of her. Today, though, the Pakistani media is no longer in a position to stand behind Malala — even though Punjab province is not ruled by the Taliban. It is ruled by the party of Prime Minister Imran Khan. Unfortunately, his government is showing its contempt for media freedom and working to suppress dissenting voices — just like the Taliban used to do in Swat.

Although Pakistan is a democracy, journalists now fear that a crackdown on the media is in the offing. The government of Imran Khan is moving ahead with a law to create a new media regulator, to be called the “Pakistan Media Development Authority,” to oversee mainstream and social media.

The body will have draconian powers. All the major media organizations have rejected this proposed “reform” with a single voice; some are calling it “media martial law.” The million-dollar question is this: Why does Imran Khan need a new regulatory body for the media, and why is the journalistic community so united against it?

Information Minister Fawad Chaudhry has said the government plans to table the bill in parliament in the next few days, and that it will be imposed within 45 days after passage.

The proposed law is just the latest stage of an effort to impose state control over all segments of the media by creating an overcentralized body to be headed by a top bureaucrat of the information ministry. According to the new law, all media outlets including social media platforms will require an annual waiver from the government to remain operational. Failure to comply will result in suspension and other penalties. For the first time in Pakistan’s history, special media regulatory authority will be introduced to punish “offenders” from the media with three years’ imprisonment and fines amounting to 25 million Pakistani rupees ($152,000 in U.S. dollars).

When I asked Minister Chaudhry why his ministry wanted to establish media tribunals, he said: “We have only proposed fines for violating journalistic ethics.” He claimed: “The media tribunals will decide disputes between the media workers and the owners.”

Yet, journalists can hardly be blamed for suspecting that this law is yet another attempt to legalize censorship. Many analysts think that the new proposed law does not bode well for democracy and that the Pakistani media is entering a new dark age.

Many independent journalists as well as social media commentators are already facing false cases registered by the Federal Investigation Agency (FIA) under cyber laws. The most recent incident in this regard was the arrest of two vocal journalists from Lahore, Amir Mir and Imran Shafqat. Journalists have good reason to worry that the new law will only create new problems for the already brutalized and terrified media.

The Afghan Taliban has captured Kabul, and their Pakistani allies are also returning to the Swat Valley and other parts of the country. A few days ago Prime Minister Khan praised the Afghan Taliban for, as he put it, “breaking the shackles of slavery.”

And that raises an obvious question: So why is he making new shackles for the media in Pakistan? Pakistan needs a strong and free media to fight growing threat of extremism. “Media martial law” will only help those who can’t tolerate the pictures of Malala in our schoolbooks and who don’t want to see democracy in Pakistan flourish. The talk of an impending dark age for the media looks more justified by the day.