CAIRO — Egypt’s chief prosecutor delivered a withering broadside against the news media on Wednesday, blaming the “forces of evil” for negative coverage and instructing his staff to take legal action against outlets deemed to be undermining Egypt’s security.

The remarks by the prosecutor, Nabil Sadek, were the latest escalation of a draconian crackdown on civil liberties before a presidential election in March that has become fraught with tension even though President Abdel Fattah el-Sisi faces no real opposition.

In comments that appeared aimed at the foreign news media, Mr. Sadek accused outlets of spreading false news “to disturb the public order and terrorize society.” A day earlier, Egypt had called for a boycott of the BBC over a documentary that aired last week detailing torture and illegal abductions by Egyptian security forces.

Local news coverage has been dominated in recent days by a wave of government-driven outrage over the documentary. Although the documentary contained abuse accusations already widely documented by human rights groups, it was denounced as propaganda spread by the outlawed Muslim Brotherhood.