Daniel Ellsberg talking with reporters outside the Federal Building in Boston after surrendering to authorities for supplying the New York Times with secret Pentagon papers in June, 1971. (Bettmann/Getty Images)

On the evening of October 1, 1969, as defense researcher Daniel Ellsberg packed up his briefcase at the end of the workday, he was wracked with stress. His pulse raced as he swiftly walked past the security guards at the RAND Corporation office in Santa Monica.

Ellsberg managed to steel himself on a drive from his office to an advertising agency in Hollywood owned by the girlfriend of RAND colleague Anthony Russo.

The two returned to that office in Hollywood for much of the next year, working in secrecy through the night to photocopy multiple sets of a top secret report that Ellsberg smuggled from his RAND safe. The massive report — which totaled 7,000 pages, including 3,000 pages of analysis and 4,000 pages of documentation from the Defense Department, the State Department, and the CIA — would later be known as the Pentagon Papers.

Robert McNamara, secretary of defense for Lyndon Johnson, had publicly praised the American efforts in Vietnam, but privately he had determined the Vietnam War was a lost cause. He commissioned a report documenting how the U.S. came to be involved. So secretive was the project that not even Johnson knew of its existence.

After 18 months and dozens of researchers, RAND delivered the 60-pound set to McNamara under the title, "United States-Vietnam Relations, 1945-1967."

The findings, which showed the Eisenhower, Kennedy, and Johnson administrations repeatedly lied to the American public, were damning.

The U.S. had geographically expanded its war with the bombing of Cambodia and Laos and coastal raids on North Vietnam, which was unreported in U.S. media. The Eisenhower and Kennedy administrations had perhaps violated the Geneva Accords. Kennedy knew of plans to overthrow South Vietnamese leader Ngo Dinh Diem well before the 1963 coup. And Johnson had decided to increase American involvement in Vietnam, while publicly saying "we seek no wider war" during his 1964 presidential campaign. Further, a Johnson administration Defense Department memo said that 70 percent of the reason the U.S. should remain in the Vietnam War was "to avoid a humiliating U.S. defeat."

Throughout 1969, Ellsberg lived a double life. As an advisor on Vietnam policy to newly-inaugurated President Richard M. Nixon and Secretary of State Henry Kissinger, he grew increasingly frustrated with their insistence on expanding the war. He also began attending peace rallies and lectures.

Ellsberg knew leaking the report would be damaging to the president's case for escalation, "evidence of a quarter century of aggression, broken treaties, deceptions, stolen elections, lies and murder."

Wounded marine gunner being led past a stricken comrade after a fierce firefight in Vietnam. © Larry Burrows/The LIFE Picture Collection/Getty Images

After months of failing to gain any traction within government circles, Ellsberg went to Neil Sheehan of The New York Times in March 1971. Although the Times downplayed their interest in the report to Ellsberg, they had secretly set up a remote newsroom in a suite at The Hilton that only the 20 staffers in the hotel room knew about so as to avoid a potential FBI seizure at the Times Square newsroom.

On June 13, 1971, The New York Times published the first installment of the Pentagon Papers in the early edition of the Sunday paper.

"This goddamn New York Times exposé of the most highly classified documents of the war," said White House Chief of Staff Alexander Haig on a recording of his conversation with Nixon. "This is a devastating security breach of the greatest magnitude of anything I've ever seen."

The next day, Monday, June 14, the Times dropped the second installment of the Papers with a front-page article by Sheehan, "Vietnam Archive: A Consensus to Bomb Developed before '64 Election, Study Says."

Nixon had grown agitated, but expressed to John D. Ehrlichman, counsel and assistant to the president for domestic affairs, that he wished to leave the newspaper alone in preference for punishing the individual who leaked the study over their disloyalty, saying, "Hell, I wouldn't prosecute the Times. My view is to prosecute the goddamn pricks that gave it to them."

The next day, attorney General John Mitchell, who feared that the government would forfeit the right to prosecute the newspaper if it did not respond to their articles immediately, pressed for Nixon's permission to send the newspaper a legal warning to cease publication. Nixon was reluctant to interrupt the damning evidence against Democrats, but agreed in a short phone call to Mitchell's plan, reasoning that the Times was an "enemy." The paper replied that it would "respectfully decline" the Attorney General's request.

The Department of Justice was eventually successful in obtaining a temporary restraining order against the Times for further publication of the material, arguing that it was detrimental to U.S. national security, so Ellsberg then provided a set of the Pentagon Papers to The Washington Post. When a judge imposed an injunction against the Post, he sent a copy to The Boston Globe. Ellsberg kept this up until more than a dozen newspapers across the country printed sections of the Pentagon Papers.

On June 30, 1971, in the case, New York Times Co v. The United States, the Supreme Court issued a 6-3 decision permitting the newspapers to print the Pentagon Papers without risk of government censure, saying the government had failed to prove harm to national security and that printing the report was allowable under the First Amendment.

"This was not a breach of the national security," New York Times publisher Arthur Sulzberger later said, referring to his decision to publish the Pentagon Papers. "The American people had a right to read them and we at the Times had an obligation to publish them."

Richard Nixon, Republican candidate for president, in August 1968. (AP Photo)

Ellsberg, however, was still fair game. On June 28, 1971, two days before the Supreme Court had made its decision, he surrendered to the U.S. attorney's office in Boston. He said of leaking documents to the press: "I felt that as an American citizen, as a responsible citizen, I could no longer cooperate in concealing this information from the American public. I did this clearly at my own jeopardy and I am prepared to answer to all the consequences of this decision."

Ellsberg was charged with conspiracy and violating the Espionage Act of 1917. He faced a total maximum sentence of 115 years in prison; Russo faced 35. In a trial in Los Angeles that began on January 3, 1973, Ellsberg's attorneys claimed that the documents were illegally classified, to keep them not from an enemy but rather from the American public. The judge deemed the argument "irrelevant." Ellsberg later recalled that his "lawyer, exasperated, said he 'had never heard of a case where a defendant was not permitted to tell the jury why he did what he did.' The judge responded: well, you're hearing one now. And so it has been with every subsequent whistleblower under indictment."

But Ellsberg was saved from almost certain prison time when it came out that a secret Nixon White House team dubbed "the plumbers" burglarized the office of Ellsberg's psychiatrist in September 1971. The FBI had also recorded numerous conversations between Ellsberg and former National Security Council member Morton Halperin without a court order. And, further, Ehrlichman had offered the judge the directorship of the FBI in a move that he interpreted as a bribe.

Citing gross governmental misconduct and illegal evidence gathering, the judge dismissed all charges against Ellsberg and Russo on May 11, 1973. In his decision, Byrne said, "The bizarre events have incurably infected the prosecution of this case."

Ellsberg was in the clear.

He remains resolute about his decision to leak the documents. "The Pentagon Papers definitely contributed to a delegitimation of the war, an impatience with its continuation, and a sense that it was wrong," he told the Center for Investigative Reporting in 2016. "They made people understand that presidents lie all the time, not just occasionally, but all the time. Not everything they say is a lie, but anything they say could be a lie."