TEHRAN — Iran’s moderate-leaning president has strongly criticized hard-line officials for ordering reformist newspapers shut down.

Judicial authorities ordered two pro-reform newspapers — Aseman and Bahar — closed in recent months on allegations of questioning Islamic principles.

President Hassan Rouhani told reporters Saturday that it was wrong to close down a newspaper on its first offense just because one writer was seen as inappropriate.

“The government is in favour of freedom of expression with responsibility,” he said in a vigorously applauded speech to media figures broadcast live on television. “If we break the pens and shut the mouths, public trust will be deeply harmed.”

Rouhani said “shutting down a newspaper should be the last resort, not the first. If one violates the law we should deal with him or the managing director of the daily.”

“Why should we shut down the whole newspaper and make a lot of people unemployed,” he asked.

Rouhani said his opponents were free to attack him. Hard-line media has denounced the historic nuclear deal his administration reached with world powers in Geneva last year a “poisoned chalice.”

Iran’s hard-line judiciary has shut down more than 150 pro-reform newspapers and jailed dozens of editors and writers, often on vague charges of insulting authorities, since 2000.

Culture Minister Ali Janati recently urged an end to the ban on social media, including Facebook. That and his move to allow the publication of previously banned books has sparked a furore among conservatives.