The United States Invasion of Panama, codenamed Operation Just Cause, lasted over a month between mid-December 1989 and late January 1990. It occurred during the administration of President George H. W. Bush and ten years after the Torrijos–Carter Treaties were ratified to transfer control of the Panama Canal from the U.S. to Panama by January 1, 2000. The primary purpose of the invasion was to depose the de facto Panamanian leader, general and dictator Manuel Noriega. Noriega, who for a long time worked with the Central Intelligence Agency, was wanted by the United States for racketeering and drug trafficking. Following the operation, the Panama Defense Forces were dissolved and President-elect Guillermo Endara was sworn into office. The United Nations General Assembly and the Organization of American States condemned the invasion as a violation of international law.