Oil on canvas portrait of Thomas Jefferson, 1805, painted by Gilbert Stuart. (Colonial Williamsburg Foundation)

During his time as U.S. minister to France, Thomas Jefferson penned a letter to a statesman from Virginia, waxing poetic about the importance of a free press.

“The basis of our governments being the opinion of the people, the very first object should be to keep that right,” Jefferson wrote to Edward Carrington in 1787. “And were it left to me to decide whether we should have a government without newspapers, or newspapers without a government, I should not hesitate a moment to prefer the latter. But I should mean that every man should receive those papers and be capable of reading them.”

Those words would help identify the Founding Father as a champion of the press.

But as Jefferson was writing them, scholars say, he did not foresee that newspapers would become a partisan tool for warring political factions in a climate of unrest and uncertainty over the fate of a nascent nation.

By the time he was approaching his presidency, anxieties were high and newspapers had taken a critical stance. Jefferson in turn had taken critical tone with them, at least in his in personal letters, in which he often excoriated the press — much as the 45th president, Donald Trump, would do more than 200 years later.

“Nothing can now be believed which is seen in a newspaper,” Jefferson said then.

“FAKE NEWS media … makes up stories and 'sources,'” Trump tweets now.

“Thomas Jefferson was as irritated with newspaper coverage as any public figure of his era,” Ken Paulson, president of the Newseum Institute's First Amendment Center, told The Washington Post in an email. “For all the talk of media bias today, it can't compare to the overt partisanship and personal attacks appearing in papers in our nation's early years. But Jefferson also knew that our democracy could only flourish with a free press that would keep an eye on people in power and help protect our freedoms.

“He understood that press coverage comes and goes, but freedom of the press must endure.”

The Newseum celebrates Jefferson's famous First Amendment stance, selling a magnet with one of his quotes: “The only security of all is in a free press.”

President Trump berated the media repeatedly at his press conference on Feb. 16, calling CNN, the New York Times and other outlets "dishonest" and "very fake news," for reporting unfavorable stories about him. (Video: Reuters / Photo: Jabin Botsford/The Washington Post)

Trump has repeatedly lambasted the media, first for its coverage of his presidential campaign and, now, of his administration. During a combative 75-minute news conference Thursday, the president continued to air his grievances, saying, “I’ve never seen more dishonest media than, frankly, the political media.”

At the time Jefferson wrote the storied words about press freedom that journalists have since embraced as a mantra, “his view of the press was uncluttered with the experience he was going to soon acquire,” said Joseph Ellis, a U.S. historian who has written a biography about Jefferson, “American Sphinx.”

“His view of the press was going to change,” he said.

Jefferson was a controversial presidential candidate, portrayed in the press as a Francophile and an atheist and was later rumored to have had children with a slave at Monticello (now widely believed by historians). Many people were worried he was putting the survival of the republic at risk — and that sentiment was echoed in the press, historians say.

Then during his presidency, the historians say, he was heavily criticized for his actions, namely the Louisiana Purchase and the Embargo Act of 1807.

In 1796, a year before he became vice president, Jefferson wrote a letter to George Washington, saying that “from a very early period of my life, I had laid it down as a rule of conduct, never to write a word for the public papers.”

But Ellis, the historian, noted that “Jefferson never said about the press what Trump says about the press.”

Still, Ellis said, “Jefferson recognized the press as one of the pillars of the society we wanted; but when he came under criticism in a big way, he used his powers to censor them.”

In a 1993 op-ed in the New York Times, the Pulitzer Prize-winning journalist Anthony Lewis wrote:

In 1798 the Federalists pushed through Congress a Sedition Act making it a crime to publish false, malicious comments about the President or Congress. (They exempted Vice President Jefferson from this protection against abuse.)

The aim of the law was to silence the country's main Jeffersonian newspapers in the run-up to the election of 1800. Their editors and owners were indeed prosecuted, some for mere critical opinions or lampooning of President Adams.

Jefferson and James Madison, the author of the First Amendment, worked to rouse the public against the Sedition Act. They argued that the Federalists, by trying to silence speech critical of politicians, were taking America back to the British system — the tyranny of George III. And their arguments persuaded many, contributing to Jefferson's defeat of Adams.

When Jefferson took office, on March 4, 1801, he pardoned all those who had been convicted under the Sedition Act. In his Inaugural Address he opened his arms to his bitter opponents — and set out what I think is the true American attitude toward freedom of speech.

But once Jefferson was in office, he tried to censor the critical press.

In his second term, in response to serious criticism from the New England newspapers … he instructed the state attorney generals in New England to prosecute the newspaper editors for sedition in the same way he had opposed such behavior when it was done by the federal government,” said Ellis, the historian.

The move further alienated Jefferson from the journalists, as well as the clergy.

It was during his second term in 1806 that Jefferson wrote to U.S. Rep. Barnabas Bidwell of Massachusetts, “As for what is not true you will always find abundance in the newspapers.”

The next year, Jefferson made his opinion known in a letter to John Norvell, a politician, lawyer and journalist who had written to him about plans to start his own newspaper.

“To your request of my opinion of the manner in which a newspaper should be conducted, so as to be most useful, I should answer, 'by restraining it to true facts and sound principles only,'" Jefferson said. “Yet I fear such a paper would find few subscribers. It is a melancholy truth, that a suppression of the press could not more completely deprive the nation of it's benefits, than is done by it's abandoned prostitution to falsehood.

“Nothing can now be believed which is seen in a newspaper. Truth itself becomes suspicious by being put into that polluted vehicle.”

Jefferson's presidency ended in 1809 — but his frustrations with the press did not.

In 1814, he said, “I deplore with you the putrid state into which our newspapers have passed, and the malignity, the vulgarity, and mendacious spirit of those who write for them.”

A year later, he wrote to James Monroe: “A truth now and then projecting into the ocean of newspaper lies, serves like head-lands to correct our course. Indeed, my skepticism as to everything I see in a newspaper, makes me indifferent whether I ever see one.”

And then again the next year: “From forty years' experience of the wretched guess-work of the newspapers of what is not done in open daylight, and of their falsehood even as to that, I rarely think them worth reading, and almost never worth notice.”

Monticello historian Christa Dierksheide said Jefferson was lamenting the press he envisioned when he first fought for its freedoms.

“As an idealist, he continued to hope that the press would overcome its partisan leanings,” she told The Post. “But that never happened.”

But, Dierksheide said, Jefferson still “held that a free press had to be protected.”

“He felt that a free press was an expression of the people's opinion,” she said, “and there had to be an outlet for their opinion because government was based on their opinion.”

This story has been updated.