Given the FBI’s history of insinuating itself into presidential campaigns, this latest October surprise shouldn’t have been any surprise at all.

As early as 1919, Woodrow Wilson’s attorney general, the progressive A. Mitchell Palmer, deployed bureau agents in an eponymous operation to round up and deport alleged radical immigrants. The Palmer Raids were ostensibly a response to a series of bombings, but it became apparent that Palmer had had something more in mind when he threw his hat into the ring for the 1920 Democratic presidential nomination and ran on a proto-Trumpian agenda of “undiluted Americanism.” Palmer didn’t get past the first ballot, however, and ultimately the raids’ most lasting impact was Palmer’s decision to have his young assistant administer the arrests. The official, whose own youthful ambition earned him the nickname “Speed,” was 24-year-old J. Edgar Hoover.

Following the Teapot Dome scandal, the seemingly incorruptible Hoover was appointed to head the bureau. If money didn’t tempt Hoover, power did. While he managed to survive the Coolidge and Hoover administrations, Roosevelt nearly brought Hoover’s career to a premature halt. After his election, FDR announced that Montana Senator Thomas J. Walsh, a fierce opponent of the Palmer raids, would be his attorney general. Walsh told friends that Hoover would be replaced. But that month, Walsh married a Cuban woman in Havana. After flying back to Florida, the couple boarded a train to Washington. While passing through North Carolina, Walsh’s wife found him on the floor, dead, the apparent victim of too much honeymooning.

Homer Cummings, who replaced Walsh, retained Hoover. The director quickly realized the way to keep his job was to make himself indispensable to FDR. Wiretapping was a relatively new investigative tool, and as it turned out Roosevelt was eager to use it against his political opponents on the left and right. Up for reelection in 1936, he had Hoover eavesdrop on the leftist members of the Newspaper Guild and other suspected members of the Communist Party, despite the party’s attempt to establish a “popular front.”

Then, as FDR began to gear up for a third term, Hoover went after Father Charles E. Coughlin, the ultraconservative radio priest who was a major thorn in Roosevelt’s side. In January 1940, 17 members of Coughlin’s pro-Hitler Christian Front were arrested by the FBI, charged with plotting to kill several congressmen. Whether the charges were accurate or not, the arrests finished Coughlin as an influential political figure.

That same year, the bureau sought to quash the opposition of the Abraham Lincoln Brigade veterans with raids on its offices. But it was in 1948 that Hoover unleashed the FBI for the first time to further his own career. Like everyone who was not a member of the Truman family, Hoover assumed that Thomas Dewey would be the next president. Hoover’s former assistant William Sullivan recalled that Hoover believed if he used the bureau’s resources on behalf of the Dewey campaign, he would be named attorney General as a stepping stone to the Supreme Court and eventually to becoming Chief Justice.

“Many agents—I was one,” recalled Sullivan, “worked for days culling FBI files for any fact that could be of use to Dewey.” After Dewey secured the nomination, Hoover fed him backgrounders on crime issues and information about Truman’s connections to Kansas City boss Tom Pendergast. The FBI also pressured HUAC chairman J. Parnell Thomas to jump-start its hearings after a grand jury brought no indictments from testimony by Elizabeth Bentley and Whittaker Chambers. As Drew Pearson wrote, “Those watching [Assistant Director] Lou Nichols note that he goes in and out of the office of [Thomas] like an animated shuttlecock.”

At the same time, the bureau was intensely involved in disrupting Henry Wallace’s third-party campaign. Wallace had been a target of the FBI when he was still vice president, but in 1948, the bureau stepped up its activities by surveilling and intimidating Wallace staffers and supporters and feeding negative information about Wallace to the press and the Truman campaign, which cooperated with the bureau’s efforts. Truman’s victory marked an end to Hoover’s ambitions. The 1952 election and the subsequent races found the director again in survival mode by making himself useful to his favored candidates.

While most people remember the 1952 campaign for Richard Nixon’s “Checkers” speech, the FBI’s efforts to slander Adlai Stevenson (perhaps for personal, as well as political reasons) as a closeted homosexual gets less attention. According to Hoover’s biographer, Curt Gentry, the director was the source of rumors that Stevenson had once been arrested on morals charges. The same rumors were spread in 1956, but only Walter Winchell took the bait, notoriously declaring that a vote for Stevenson was a vote for Christine Jorgensen.

In 1960, it was John F. Kennedy’s turn. Concerned about JFK’s possible plans, Hoover let Kennedy’s aides know that the bureau had recordings of JFK’s wartime trysts with Inga Arvad, a Danish woman suspected of having Nazi ties. Hoover was told he would be retained.

Lyndon Johnson enjoyed Hoover’s gossip (he once famously said that it was “better to have him inside the tent pissing out, than outside the tent pissing in”), but the two were on opposing sides in the 1968 race. As a last-ditch effort to help the troubled Hubert Humphrey campaign, Johnson announced the resumption of peace talks with North Vietnam. He soon learned, however, that South Vietnam’s president Nguyen Van Thieu was sabotaging the effort, convinced he could get a better deal if Nixon won. Madame Anna Chennault, a GOP leader and a close friend of South Vietnam’s ambassador Bui Diem, was the person whispering in Thieu’s ear. Gentry writes that when information turned up that she was communicating to Nixon through Spiro Agnew, Johnson thought he had clinched the election for Humphrey, but Agnew’s phone records just happened to turn up missing. The investigation was closed and Nixon went on to a narrow victory.

In 1972, George McGovern became the last candidate to challenge Hoover’s supremacy when he announced that if elected he would replace the clearly aging director. Sullivan recalled that agents were again ordered again to collect malicious gossip for leaking to the press. Ironically, many of Nixon’s Watergate-era excesses, such as the Huston Plan, were too much even for Hoover. He died anyway that May, six weeks before the break-in. Since his death and until this year, the FBI has mostly stayed on the outside of presidential elections, as the work of disruption and dirty tricks has been usurped by party operatives who can operate with less restraint than even Hoover could.

In 1948, Henry Wallace grasped the larger issues stemming from the FBI’s actions, declaring, “We Americans have far more to fear from those actions which are intended to suppress political freedom than from the teaching of ideas with which we are in disagreement.”

If Hoover were alive today he’d be 121 years old and undoubtedly still running the FBI. Considering Comey’s actions, perhaps a séance would be in order to see if he still is.