Martín Torrijos is the son of military ruler Omar Torrijos, who was Panama's social reformer and military strongman from 1968 until his death in a 1981 plane crash. The younger Torrijos is an illegitimate child primarily raised by his mother, but his father publicly acknowledged him when he became a teenager. Born in Chitré, Herrera, he graduated from St. John's Northwestern Military Academy located in Delafield, Wisconsin, in the United States and studied political science and economics at Texas A&M University in College Station, Texas. During his time in the US, he also worked in Chicago, managing a McDonald's restaurant.
During the presidency of Ernesto Pérez Balladares (1994–1999), Torrijos served as deputy minister for the interior and justice. His most significant act as deputy minister was to sign into law the complete privatization of Panama's water utilities. When the new law proved unpopular, the Democratic Revolutionary Party (PRD) effected a reversion to the previous system. During his term in office the rate of armed robberies and assault increased. There were several reported cases where SUNTRACS, a workers union, was angered, causing several riots which involved rock flinging.
After the failure of a constitutional referendum that would have allowed PRD incumbent Ernesto Pérez Balladares to seek a second consecutive term, Torrijos was named to represent the PRD in the 1999 general election. Torrijos was selected in part to try to win back left-leaning voters after the privatizations and union restrictions instituted by Pérez Balladares. His main opponent was Arnulfista Party candidate Mireya Moscoso, widow of former Panamanian President Arnulfo Arias, who had been deposed in the military coup that had brought Torrijos's father Omar to power. Moscoso ran on a populist platform, beginning many of her speeches with the Latin phrase "Vox populi, vox Dei" ("the voice of the people is the voice of God"), previously used by Arias to begin his own speeches. She pledged to support education, reduce poverty, and slow the pace of privatization. While Torrijos ran in large part on his father's memory—including using the campaign slogan "Omar lives"—Moscoso evoked that of her dead husband, leading Panamanians to joke that the election was a race between "two corpses". Torrijos and the PRD were ultimately hampered by the corruption scandals of the previous administration, as well as a scandal in which La Prensa reported that two members of his campaign had been bribed by Mobil to sell a former US military base. Moscoso defeated Torrijos with 45% of the vote to 37%.
Torrijos ran again in the 2004 presidential election on a platform of strengthening democracy and negotiating a free trade agreement with the US, and was supported by popular musician and Politician Ruben Blades; Torrijos later made Blades the nation's tourism minister. Torrijos' primary rival was Guillermo Endara, who had served as President from 1990 to 1994. Endara ran as the candidate of the Solidarity Party, on a platform of reducing crime and government corruption. Endara and the other candidates also ran a series of negative ads highlighting the PRD's connections with former military ruler Manuel Noriega. Endara finished second in the race, receiving 31% of the vote to Torrijos' 47%.
In May 2005, the Torrijos government proposed increasing pension contributions and raising the retirement age to help pay off the nation's increasing foreign debt. The changes triggered several weeks of protests, strikes, and a student-led closure of the University of Panama, and the proposal to increase the retirement age was postponed. Following opposition from the Roman Catholic Church and union Leaders, Torrijos also initially postponed plans to reform social security, though he successfully passed a reform measure later in his term.
In November 2006, Torrijos sponsored the Latin American and Caribbean Congress in Solidarity with Puerto Rico's Independence in favor of Puerto Rico's independence and made an energetic call to the United States to recognise the independence of Puerto Rico. His administration opposed Colombian President Alvaro Uribe's proposals to build a road through the undeveloped Darién Gap connecting the countries, stating that it could damage ecotourism in the region.
In 2007, Torrijos negotiated the Panama–United States Trade Promotion Agreement with the administration of George W. Bush. Though ratified in Panama and apparently headed to ratification in the US, the agreement was derailed in September 2007 when fellow PRD member Pedro Miguel González Pinzón was elected President of the National Assembly. González Pinzón had been indicted by a US grand jury for the 1992 murder of US Army Sgt. Zak Hernández, and some members of the US Congress vowed to oppose the pact until González Pinzón no longer held the post. Unwilling to publicly battle his party's nationalist wing, Torrijos privately asked González Pinzón to resign, but avoided criticizing him in the press. The deal was finally ratified under Torrijos's successor, Ricardo Martinelli.
Torrijos was again popular by the end of his term, but because Panama's constitution forbids consecutive second terms for the presidency, the PRD nominated Balbina Herrera as a candidate to succeed him in 2009. She lost to an independent candidate, Ricardo Martinelli, the owner of a supermarket chain.
Shortly before leaving office, Moscoso sparked controversy by pardoning four men—Luis Posada Carriles, Gaspar Jimenez, Pedro Remon and Guillermo Novo Sampol—who had been convicted of plotting to assassinate Cuban President Fidel Castro during a 2000 visit to Panama. Cuba broke off diplomatic relations with the country, and Venezuelan President Hugo Chávez recalled the nation's ambassador. Moscoso stated that the pardons had been motivated by her mistrust of Torrijos, saying, "I knew that if these men stayed here, they would be extradited to Cuba and Venezuela, and there they were surely going to kill them there."