The Committee to Protect Journalists has put a spotlight on Kenya and Tanzania over their treatment of the media in the past few months.
The Committee and 64 civil society groups from around the world want the Tanzania government to address the deteriorating environment for media, human rights defenders and opposition party members.
They also urge Kenya's President Uhuru Kenyatta not to sign into law the Cybercrimes Bill that was passed by parliament in April, saying it was intended to stifle press freedom in the country.
In a letter to Tanzania's President John Magufuli, CPJ and the human-rights organisations, urge the government to recognise "the essential role that a vibrant civil society and an independent media play in creating peaceful and equal societies."
"We are deeply alarmed that these human-rights issues are being undermined by the unwarranted closure of media outlets, judicial persecution and harassment of independent journalists, the targeted assassination of opposition party members, blanket restrictions on peaceful protests and the introduction and invocation of a raft of laws to undermine freedom of speech online," they added.
Tanzania's Electronic and Postal Communications (Online Content) Regulations, which were signed into law in March, stipulate that all bloggers and persons operating online radio and television streaming services must secure a license and pay an annual fee of over $900 before they can publish any material online.
The 2015 Cybercrimes Act also gives the government power to arbitrarily ban and sanction the dissemination of newspaper articles or social media posts which it deems critical, including insulting the president.
On April 26, Kenya's parliament approved the Computer and Cybercrimes Bill, 2017, which among other provisions, criminalises the publication of false news and stipulates hefty fines and lengthy prison terms for those found guilty of the offence.
"We urge President Kenyatta to refer it back to parliament so that members can ensure that its provisions do not violate the right to media freedom and free expression," said CPJ Africa programme co-ordinator Angela Quintal in New York.