The Torrijos–Carter Treaties (Spanish: Tratados Torrijos-Carter) are two treaties signed by the United States and Panama in Washington, D.C., on September 7, 1977, which superseded the Hay–Bunau-Varilla Treaty of 1903. The treaties guaranteed that Panama would gain control of the Panama Canal after 1999, ending the control of the canal that the U.S. had exercised since 1903. The treaties are named after the two signatories, U.S. president Jimmy Carter and the Commander of Panama's National Guard, General Omar Torrijos.
 This first treaty is officially titled The Treaty Concerning the Permanent Neutrality and Operation of the Panama Canal (Spanish: Tratado Concerniente a la Neutralidad Permanente y Funcionamiento del Canal de Panamá) and is commonly known as the "Neutrality Treaty". Under this treaty, the U.S. retained the permanent right to defend the canal from any threat that might interfere with its continued neutral service to ships of all nations. The second treaty is titled The Panama Canal Treaty (Tratado del Canal de Panamá), and provided that as from 12:00 on December 31, 1999, Panama would assume full control of canal operations and become primarily responsible for its defense.
 Panamanian efforts to renegotiate the original Hay–Bunau-Varilla Treaty had been ongoing almost since it was first signed in November 1903, a few weeks after Panama obtained its independence from Colombia. However, activity to renegotiate or abrogate the treaty increased considerably after the Suez Crisis, and events in 1964 precipitated a complete breakdown in relations between the U.S. and Panama. On January 9 of that year, Panamanian students entered the canal zone to fly the Panamanian flag next to the American flag, per a 1963 agreement to defuse tension between the two countries. Panamanians watching the event began rioting after the students raising the Panamanian flag were jeered and harassed by American school officials, students, and their parents.  During the scuffle, somehow the Panamanian flag was torn. Widespread rioting ensued, during which over 20 Panamanians were killed and about 500 were injured. Most of the casualties were caused by fire from U.S. troops, who had been called in to protect Canal Zone property, including private residences of Canal Zone employees. January 9 is a National Holiday in Panama, known as Martyrs' Day.
 The next day, January 10, Panama broke off diplomatic relations with the United States and on January 19, President of Panama Roberto Chiari declared that Panama would not re-establish diplomatic ties with the United States until the U.S. agreed to begin negotiations on a new treaty. The first steps in that direction were taken shortly thereafter on April 3, 1964, when both countries agreed to an immediate resumption of diplomatic relations and the United States agreed to adopt procedures for the "elimination of the causes of conflict between the two countries". A few weeks later, Robert B. Anderson, President Lyndon Johnson's special representative, flew to Panama to pave the way for future talks.  Negotiations over the next years resulted in a treaty in 1967, but it failed to be ratified in Panama.
 After the failure of those treaties, Panama experienced a change in government following a 1968 military coup. The new government was consolidated under Omar Torrijos, who decided to definitively reject the 1967 treaty. In response to a lack of progress of negotiations with the Nixon administration, the Torrijos government succeeded in holding a March 1973 United Nations Security Council session in Panama City, where it attracted considerable international support for its cause. The diplomatic debacle also attracted Henry Kissinger's attention and helped produce momentum for the 1974 Tack-Kissinger agreement, which would provide the crucial framework for negotiations moving forward. "It was this work, beginning in late 1972, that made Panama the visible issue that Carter boldly hoped to solve as a watershed for a new style of foreign policy and an era of improved relations with Latin America."
 The Carter administration made the canal a high priority, starting during the transition. The issue had been highlighted by a blue-ribbon commission headed by Ambassador Sol Linowitz. Several individuals associated with that commission would play major roles in the Carter administration's Latin America policy, including Linowitz himself and NSC Senior Director Robert A. Pastor. Negotiations were resumed on February 15, 1977, and were completed by August 10 of that year. On the American side the negotiators were Ellsworth Bunker and Sol Linowitz; the Panamanian side of the negotiations was headed by Rómulo Escobar Bethancourt. Senator Dennis DeConcini sponsored a critical amendment to the Panama Canal Treaty that allowed the Senate to come to a consensus on giving control of the Canal to Panama. A few days before final agreement on the treaties was reached, President Jimmy Carter had sent a telegram to all members of Congress informing them of the status of the negotiations and asking them to withhold judgment on the treaty until they had an opportunity to carefully study it. Senator Strom Thurmond responded to Carter's appeal by stating in a speech later that day, "The canal is ours, we bought and we paid for it and we should keep it."
 Both treaties were subsequently ratified in Panama by a two-thirds vote in a referendum held on October 23, 1977. To allow for popular discussion of the treaties and in response to claims made by opponents of the treaty in the U.S. that Panama was incapable of democratically ratifying them, restrictions on the press and on political parties were lifted several weeks prior to the vote. On the day of the vote, 96% of Panama's eligible voters went to the polls, the highest voter turnout in Panama up to that time. The neutrality treaty was of major concern among voters, particularly on the political left, and was one reason why the treaties failed to obtain even greater popular support.
 The United States Senate advised and consented to ratification of the first treaty on March 16, 1978, and to the second treaty on April 18 by identical 68 to 32 margins. On both votes, 52 Democrats and 16 Republicans voted in favor of advising and consenting to ratification, while 10 Democrats and 22 Republicans voted against.
 The treaties were the source of vehement controversy in the United States, particularly among conservatives led by Ronald Reagan, Strom Thurmond and Jesse Helms, who regarded them as the surrender of a strategic American asset to what they characterized as a hostile government. The attack was mobilized by numerous groups, especially the American Conservative Union, the Conservative Caucus, the Committee for the Survival of a Free Congress, Citizens for the Republic, the American Security Council Foundation, the Young Republicans, the National Conservative Political Action Committee, the Council for National Defense, Young Americans for Freedom, the Council for Inter-American Security, and the Campus Republican Action Organization.
 In the years preceding (and following) the final transfer of canal assets there were efforts to declare the Carter–Torrijos treaties null and void, e.g. House Joint Resolution 77 (HJR 77) introduced by Helen Chenoweth-Hage. Support of HJR 77 was part of the 2000 platform of the Texas Republican Party but no longer appeared in the 2004 platform.
 Support for the treaties came from a variety of interests, including the Joint Chiefs of Staff and members of Congress, such as Ernest Hollings, Hubert Humphrey, and most importantly Howard Baker and Robert Byrd. Other supporters included Admiral Elmo Zumwalt and General Maxwell Taylor; John Wayne, who was friends with Omar Torrijos, AFL-CIO president George Meany, statesmen Averell Harriman, Dean Rusk, George Ball, Henry Cabot Lodge, and John Sherman Cooper, and former first lady Lady Bird Johnson. More moderate conservatives, including President Ford and Henry Kissinger, both made public statements in support of the treaty. Organized efforts to promote the treaties came from the Committee of Americans for the Canal Treaties and New Directions. Many world leaders also came out in support of the treaties, including positive statements from the leaders of Barbados, Bolivia, Dominican Republic, Guatemala, Guyana, Nicaragua, Peru, Chilean president Augusto Pinochet, Costa Rican president Daniel Oduber, and Venezuelan president Carlos Andrés Pérez.
 The treaty laid out a timetable for transfer of the canal, leading to a complete handover of all lands and buildings in the canal area to Panama. The most immediate consequence of this treaty was that the Canal Zone, as an entity, ceased to exist on October 1, 1979. The final phase of the treaty was completed on December 31, 1999. On this date, the United States relinquished control of the Panama Canal and all areas in what had been the Panama Canal Zone.
 As a result of the treaties, by the year 2000 nearly 370,000 acres (580 sq mi; 1,500 km2), including some 7,000 buildings, such as military facilities, warehouses, schools, and private residences, were transferred to Panama. In 1993, the Panamanian government created a temporary agency (Autoridad de la Región Interoceánica or "Interoceanic Region Authority", commonly referred to as ARI) to administer and maintain the reverted properties.[citation needed]
 On the day the treaty took effect, most of the land within the former Canal Zone transferred to Panama.  However, the treaty set aside many Canal Zone areas and facilities for transfer during the following 20 years.  The treaty specifically categorized areas and facilities by name as "Military Areas of Coordination", "Defense Sites" and "Areas Subject to Separate Bilateral Agreement".  These were to be transferred by the U.S. to Panama during certain time windows or simply by the end of the 243-month treaty period.
 On October 1, 1979, among the many such parcels so designated in the treaty, 34 emerged as true enclaves (surrounded entirely by land solely under Panamanian jurisdiction).  In later years as other areas were turned over to Panama, eight more true enclaves emerged.  Of these 42 true enclaves, 14 were related to military logistics, seven were military communications sites, five Federal Aviation Administration facilities, five military housing enclaves, three military base areas, two military research facilities, four secondary school parcels, one elementary school, and one hospital. At least 13 other parcels each were encircled not only by land under the absolute jurisdiction of Panama, but also by an "Area of Civil Coordination" (housing) that was subject to elements of both U.S. and Panamanian public law under the treaty.
 In addition, the treaty designated numerous areas and individual facilities as "Canal Operating Areas" for joint U.S.–Panama ongoing operations by a commission.  On the effective date of the treaty, many of these, including Madden Dam, became newly surrounded by the territory of Panama. Just after noon local time on 31 December 1999, all former Canal Zone parcels of all types had come under the exclusive jurisdiction of Panama.
 Graham Greene attended the signing with Gabriel Garcia Marquez. Greene wrote about his experience in his book Getting To Know The General: The Story of an Involvement.