Nearly 50 years ago, a series of events involving sex, official corruption and a most unlikely ending began unraveling in Washington. It was plot that makes anything seen on the fervid television series “Scandal” look tame.

The protagonists were two men who helped define the age’s unceasing conflict. On one side was FBI chief J. Edgar Hoover, who was still riding high as the unfettered guardian of the political establishment. On the other was Martin Luther King Jr., the voice of peaceful dissent, whose tone was growing ever louder as demands for equality were only slowly acknowledged.

Now more explicit details contained in the “suicide letter” — so named for its suggestion that King kill himself — show the level of antipathy Hoover had for the civil rights leader and how far he was willing to go in his smear campaign.

On Nov. 18, 1964, Hoover told reporters King was the “most notorious liar in the country” for daring to suggest that the nation’s premier law enforcement agency was less than effective in protecting those fighting Jim Crow racism in the South.

Months earlier had been the “Freedom Summer” campaign to get African-Americans to register to vote. It was a drive forever marred by violence, including the killings of three civil rights workers in Mississippi.

If the flare-up between Hoover and King had ended with just words, it would have been a minor footnote in a turbulent period.

But several days later a top FBI deputy, William Sullivan, moved to send an anonymous letter to King, threatening to make public the civil rights leader’s sex life. The missive, known to historians as the “suicide letter” for its suggestion that King kill himself to avoid the embarrassing revelations, is back in the news after Yale history professor Beverly Gage serendipitously found a full and uncensored copy in Hoover’s confidential files at the National Archives. Gage is working on a biography of Hoover.

In an essay already online and to be published soon in The New York Times Magazine, Gage details the letter, which was part of an FBI-sponsored smear campaign directed at King.

It was known in civil rights circles at the time that Hoover wanted to discredit King. A decade later, a Senate committee confirmed the FBI’s role in the anti-King campaign, as well as other examples of the government’s intelligence overreach.

“The unnamed author suggests intimate knowledge of his correspondent’s sex life, identifying one possible lover by name and claiming to have specific evidence about others,” Gage writes about the letter. “Another passage hints of an audiotape accompanying the letter, apparently a recording of ‘immoral conduct’ in action. ‘Lend your sexually psychotic ear to the enclosure,’ the letter demands. It concludes with a deadline of 34 days ‘before your filthy, abnormal fraudulent self is bared to the nation.’”

“‘There is only one thing left for you to do,’ the author warns vaguely in the final paragraph. ‘You know what it is.’”

It remains unclear whether the FBI wanted King to kill himself or just to step aside. In any case, he did neither and went on to receive the Nobel Peace Prize. His political standing continued to grow, and disillusioned African-Americans rioted across the nation after King was assassinated in April 1968.

One of the lessons from the episode is the changing nature of the news media. Hoover had tried to get the news media to do stories about King’s sex life, but those efforts failed during a time when there was still some sort of zone of privacy around public figures. It is hard to believe that the story could have been kept quiet in the current hypercharged climate of the Web and tabloid television.

Nor is the issue of government surveillance resolved in our era, given the unauthorized leaks of national defense secrets by people such as National Security Agency contractor Edward Snowden and the government’s response.

“Should intelligence agencies be able to sweep our email, read our texts, track our phone calls, locate us by GPS,” Gage wrote. “Much of the conversation swirls around the possibility that agencies like the NSA or the FBI will use such information not to serve national security but to carry our personal and political vendettas.

“King’s experience reminds us that these are far from idle fears, conjured in the fevered minds of civil libertarians,” she wrote. “They are based in the hard facts of history.”