Controversies between the executive branch of government and a vigorous, free, and often critical press are not new to our history.

But how those controversies have been resolved is instructive about the evolution of our constitutional democracy and the interdependent roles played by a free press and an independent judiciary in ensuring the preservation of its values.

This interdependence led to the U.S. Supreme Court upholding the right of the New York Times and Washington Post to publish the Pentagon Papers in spite of government attempts to suppress publication — a part of history now retold in the film “The Post.”

A much earlier example comes from our own history in Massachusetts, where the John Adams Constitution of 1780 proclaims that the freedom of the press and an independent judiciary are “essential” to liberty and the preservation of the constitutional democracy it crafted.

Just prior to the outbreak of the War of 1812, then-Massachusetts Gov. Elbridge Gerry was greatly criticized in the Boston newspapers for his statements about the possibility of war — and for trying to consolidate his power as governor.

Angered by the harshly negative articles, some of which branded him a liar, Gerry directed the state attorney general (then an appointee of the governor) to investigate what he called these “criminal libels” against him. This was in the early days of constitutionally protected free speech in America, and criminal libel laws were still used to punish journalists who wrote stories about public officials which might subject them to scorn and ridicule.

The attorney general identified 253 such newspaper articles and proposed indictments against their authors and publishers before the grand jury sitting in Boston.

It was the practice at the time for a justice of the state Supreme Court to instruct the grand jury about the laws at stake in their deliberations. Accordingly, the justice told grand jurors that, in order to commit criminal libel, one needed to act with intent to cause personal harm to the subject of the article, but most importantly, that in a democratic society that depended on citizens being informed about the character of the officials they were electing to public office — the truth of what was written was very relevant.

The grand jury voted to authorize the bringing of criminal charges against the authors of only 10 of the articles. The governor was furious and in correspondence with the justice threatened him with impeachment unless he backed down from his instruction that truth was to be considered a defense.

The justice refused, writing to Gerry that he “was prepared to be bound and dragged to the fires in the cause of liberty against despotism in the guise of democracy.” The governor issued a report to the Legislature excoriating the judiciary and its “usurpation” of power, setting the stage for possible impeachment proceedings.

The press got wind of the governor’s threats and did what newspapers and reporters do — then and now — published stories on them. The governor was defeated several months later at the next election. The justice in question became the chief justice of the Supreme Judicial Court and the first professor of law at the newly formed Harvard Law School.

John Adams had gotten it right — again.

Robert J. Cordy is a former associate justice of the Supreme Judicial Court now in private practice in Boston.