Panama was mainly colonised by the Spanish. Scotland, which was an independent country at the time, made a short-lived attempt at colonisation in the late 17th and early 18th centuries. The failure was so spectacular that it led to the bankruptcy of the Scottish treasury and subsequently to the union with England, which continues to this day.
For most of its colonial history, Panama was administered as part of Colombia. It gained independence from Spain as part of “Greater Colombia”, which later split into several smaller countries. Panama was the last country to secede.
With US support, Panama seceded from Colombia in 1903 and soon after signed a treaty with the United States that provided for the construction of a canal and US sovereignty over a strip of land on both sides of the structure (the Panama Canal Zone). The Panama Canal was built between 1904 and 1914 by the US Army Corps of Engineers. The treaty became infamous as the “treaty no Panamanian ever signed”. It was largely abrogated by the Carter administration, which promised to return the Canal Zone by 1999 (which President Clinton did). Panama’s domestic and especially foreign policy has historically depended on the opinion of the administration in Washington. No openly anti-American Panamanian president has been able to stay in power for long.
On 7 September 1977, an agreement was signed that provided for the complete transfer of the canal from the United States to Panama by the end of 1999. In the following years, parts of the zone and increasingly responsibility for the canal were transferred. The entire Panama Canal, the Canal Support Zone and the remaining US military bases were transferred to Panama by 31 December 1999. Panama has a history of military rulers who have ruled with little or no respect for the law and the constitution, the last of whom was Manuel “Pineapple Face” Noriega. Noriega is in US custody after being deposed by US military intervention in the name of “just cause” (just cause being an end to his drug trafficking regime). Noriega had been a de facto client of the United States for some time before this. After this upheaval, Panama decided to follow in the footsteps of its northern neighbour and abolished its military.