Panama was under Spanish rule for almost 300 years (1538–1821), and became part of the Viceroyalty of Peru, along with all other Spanish possessions in South America.
Spanish authorities had little control over much of the territory of Panama. Large sections managed to resist conquest and missionization until very late in the colonial era. Because of this, indigenous people of the area were often referred to as “indios de guerra” (war Indians) who resisted Spanish attempts to conquer them or missionize them. However, Panama was enormously important to Spain strategically because it was the easiest way to transship silver mined in Peru to Europe.
In the 80 years following independence from Spain, Panama was a subdivision of Gran Colombia, after voluntarily joining the country at the end of 1821.
The US intent to influence the area, especially the Panama Canal’s construction and control, led to the separation of Panama from Colombia in 1903 and its establishment as a nation. When the Senate of Colombia rejected the Hay–Herrán Treaty on January 22, 1903, the United States decided to support and encourage the Panamanian separatist movement.
In November 1903 Panama, tacitly supported by the United States, proclaimed its independence and concluded the Hay–Bunau-Varilla Treaty with the United States without the presence of a single Panamanian. The treaty granted rights to the United States “as if it were sovereign” in a zone roughly 16 km (10 mi) wide and 80 km (50 mi) long. In that zone, the US would build a canal, then administer, fortify, and defend it “in perpetuity”.
In 1914 the United States completed the existing 83-kilometer-long (52-mile) canal.
The strategic importance of the canal during World War II caused the US to extensively fortify access.
From 1903 to 1968, Panama was a constitutional democracy dominated by a commercially oriented oligarchy. During the 1950s, the Panamanian military began to challenge the oligarchy’s political hegemony. The early 1960s saw also the beginning of sustained pressure in Panama for the renegotiation of the Hay–Bunau-Varilla Treaty, including riots that broke out in early 1964, resulting in widespread looting and dozens of deaths, and the evacuation of the American embassy.
Meanwhile, Manuel Noriega‘s military regime had fostered a well-hidden criminal economy that operated as a parallel source of income for the military and their allies, providing revenues from drugs and money laundering. Noriega also began playing a double role in Central America under the supervision of the CIA. While the Contadora group conducted diplomatic efforts to achieve peace in the region, Noriega supplied Nicaraguan Contras and other guerrillas in the region with weapons and ammunition.
United States President Ronald Reagan began a series of sanctions against the military regime. The United States froze economic and military assistance to Panama in the middle of 1987 in response to the domestic political crisis in Panama and an attack on the US embassy. These sanctions did little to overthrow Noriega, but severely damaged Panama’s economy.