DAKAR, Senegal — Fears of censorship and an authoritarian crackdown on dissent have erupted on Twitter after Nigerian lawmakers proposed legislation that would hit Internet users in Africa’s largest economy with steep fines or jail time for spreading what authorities decide is fake news.

Under what is known as the social media bill, which the Nigerian Senate advanced last week, police could arrest people whose posts are thought to threaten national security, sway elections or “diminish public confidence” in the government, according to the draft text.

Authorities could also cut the Internet access of those that violate the regulation.

Supporters said the measure is meant to protect Nigerians from lies that sow unrest at a time when countries across the globe are grappling with the menace of misinformation, but Nigerian celebrities, tech activists and civic organizations argued online that such a law could muzzle free speech.

An online petition to stop the bill surpassed 70,000 signatures Monday as the debate blazed across Nigeria’s Twitterverse:

“This Social Media Bill is very worrisome,” the singer Simi told her 1.3 million followers. “Freedom of speech is almost all the power we have left.”

“If the social media bill passes, law enforcement agencies have the right to shut down internet at any time,” the television host Bolanle Olukanni tweeted to her audience of 199,000.

“When the government get to play judge & jury over what is fake & what is true, their power is sweeping & the effect chilling,”posted EiE Nigeria, a youth advocacy group.

Sen. Mohammed Sani Musa, a member of President Muhammadu Buhari’s political party who represents the Niger East district, introduced the legislation earlier this month, citing concerns that Nigeria could fall victim to the kind of cyberforces that have rattled the United States.

“It’s not an attempt to stifle free speech,” Musa told The Washington Post in a phone interview. “It is an opportunity to address growing threats in our country that could disrupt peaceful coexistence.”

Anyone accused of breaking the proposed law would get the chance to defend themselves in court, he said. Those found guilty of knowingly distributing false information could face fines of up to 300,000 Nigerian naira — or about $825 — and up to three years in prison. (Companies, including media outlets, could get slapped with penalties of $27,500.)

The bill, which is backed by a Senate majority, has moved to the Senate Committee on Judiciary, Human Rights and Legal Matters, which is mandated to hold a public hearing on the issue in the next four weeks.

It was inspired in part by what the U.S. State Department dubbed “weapons of mass distraction” after accusing Russia of interfering in the 2016 presidential election.

Nigeria requires a stronger response to falsehood campaigns, Musa said, whether they sprout up at home or abroad. One hoax that Buhari died and was replaced with a clone, for instance, went viral last year.

“The U.S. democracy has been around for 200 years, and ours is only 20 years old,” the Nigerian senator said. “The problem is unbearable for Nigeria.”

Sen. Chimaroke Nnamani, who represents the opposition People’s Democratic Party in the Enugu East district, also invoked the United States when he criticized the bill last week in the Nigerian capital, Abuja.

“Yes, fake news has done a lot in America and other advanced nations,” he said on the parliament floor, “but they have not brought any law to deal with fake news.”

“This bill is an attempt to surreptitiously introduce a censor into our laws,” Nnamani said, adding that Nigeria already has regulations that prohibit slander and libel.

The legislative move comes less than two months after Singapore enacted a similar measure, prompting worries the government could use its newfound power to quash dissent ahead of elections.

People who post content the Asian country considers malicious and damaging to national interests could be sentenced to a decade in prison.

After the law passed this spring, Google said it could also hamper digital innovation.