The Pentagon Papers, officially titled United States–Vietnam Relations, 1945–1967: A Study Prepared by the Department of Defense, were a top-secret United States Department of Defense history of the United States' political-military involvement in Vietnam from 1945 to 1967. Commissioned by United States Secretary of Defense Robert S. McNamara in 1967, the study was completed in 1968. It was leaked to the public in 1971, impacting the administration of U.S. President Richard Nixon.
Secretary of Defense McNamara commissioned the study in 1967 and appointed Leslie Gelb (the Pentagon's international security affairs policy planning and arms control director) as study supervisor. Gelb hired 36 military officers, civilian policy experts, and historians to write the study's monographs. The Pentagon Papers, completed in 1968, comprised 7,000-pages in 47 volumes and included 4,000 pages of actual documents from the 1945–67 period.
The study was classified as top-secret and never intended for publication. However, contributor Daniel Ellsberg gave most of the Pentagon Papers to New York Times reporter Neil Sheehan, with Ellsberg's friend Anthony Russo assisting in their copying. The Times began publishing excerpts as an article-series on June 13, 1971. Political controversy and lawsuits followed; on June 29, U.S. Senator Mike Gravel (then Democrat, Alaska) entered 4,100 pages of the Papers to the record of his Subcommittee on Public Buildings and Grounds. These portions of the Papers were subsequently published by Beacon Press, the publishing arm of the Unitarian Universalist Association of Congregations.
The importance of recording the Papers to the Congressional Record was that, Article I, Section 6 of the United States Constitution provides that "for any Speech or Debate in either House, [a Senator or Representative] shall not be questioned in any other Place", thus the Senator could not be prosecuted for anything said on the Senate floor, and, by extension, for anything entered to the Congressional Record, allowing the Papers to be publicly read without threat of a treason trial and conviction.
Later, Ellsberg said the documents "demonstrated unconstitutional behavior by a succession of presidents, the violation of their oath and the violation of the oath of every one of their subordinates", and that he had leaked the papers in the hopes of getting the nation out of "a wrongful war."
The Pentagon Papers revealed many things, including the extent of the John F. Kennedy administration's involvement in Vietnam and his role in sanctioning the overthrow of Vietnamese leader Ngo Dinh Diem. The most damaging revelation was that the US deliberately expanded its war with carpet bombing of Cambodia and Laos, coastal raids on North Vietnam, and Marine Corps attacks — which had all gone unreported in the US. The revelations widened the credibility gap between the US government and the people, hurting the Nixon administration's war effort.
A credibility gap of which the New York Times wrote was that a consensus to bomb North Vietnam had developed in the Johnson administration on September 7, 1964, before the US presidential elections. 
Another controversy was that President Johnson sent combat troops to Vietnam by July 17, 1965, after pretending to consult his advisors on July 21–July 27, per the cable stating that "Deputy Secretary of Defense Cyrus Vance informs McNamara that President had approved 34 Battalion Plan and will try to push through reserve call-up." In 1988, when that cable was declassified, it revealed "there was a continuing uncertainty as to [Johnson's] final decision, which would have to await Secretary McNamara's recommendation and the views of Congressional leaders, particularly the views of Senator [Richard] Russell."
Prior to publication, the New York Times sought legal advice. The paper's regular outside counsel, Lord Day & Lord advised against publication but house counsel James Goodale prevailed with his argument the press had a First Amendment right to publish information significant to the people's understanding of their government's policy.
After the publication, President Richard Nixon argued Ellsberg and Russo were guilty of felony treason under the Espionage Act of 1917, because they had no authority to publish classified documents. After failing to persuade the Times to voluntarily cease publication, Attorney General John N. Mitchell and President Nixon obtained a federal court injunction forcing the Times to cease publication. The newspaper appealed the injunction, and the case New York Times Co. v. United States (403 US 713) quickly rose through the U.S. legal system to the Supreme Court.
On June 18, 1971, the Washington Post began publishing its own series of articles based upon the Pentagon Papers; Ellsberg gave portions to editor Ben Bagdikian. That day, Assistant U.S. Attorney General William Rehnquist asked the paper to cease publication. After it refused, Rehnquist unsuccessfully sought an injunction at a U.S. district court. The government appealed that decision and on June 26, the Supreme Court agreed to hear it jointly with the New York Times case.
On June 30, 1971, the Supreme Court decided, 6–3, the injunctions were unconstitutional prior restraint and the government failed to meet the heavy burden of proof required for prior restraint injunction. The nine justices wrote nine opinions disagreeing on significant, substantive matters. The ruling is generally considered a victory for an extensive reading of the First Amendment.
Thomas Tedford and Dale Herbeck summarise the reaction of editors and journalists at the time:
The Pentagon Papers (2003) is a historical film directed by Rod Holcomb about the Pentagon Papers and Daniel Ellsberg's involvement in their publication. The movie represents Ellsberg's life starting with his work for RAND Corp and ending with the day on which the judge declared his espionage trial a mistrial.
. How We Got Here: The '70s. David Frum. 2000. Basic Books. New York, New York. 0465041957. 40 - 41.
. How We Got Here: The '70s. David Frum. 2000. Basic Books. New York, New York. 0465041957. 43.