This post is also available in: Español (Spanish)
A summarized version
Archaeological evidence indicates that Panama has been inhabited for over twelve thousand years. Early inhabitants left a rich store of pottery and burial sites to mark their passing.
Spanish colonization began in the 16th century and lasted till 1821 when Panama, Colombia, Venezuela and Equador formed a union called Gran Colombia and declared independence from Spain.
In 1903 Panama with U.S. help and encouragement broke from Colombia and signed the Hay-Buneau Varilla Treaty which gave the U.S. a 10 mile wide, 50 mile long strip of land through Panama to be used "in perpetuity" to build a canal. The Panama Canal was built between 1904 and 1914 and Panama's commercial importance to the world was established.
Panama's government was in the hands of a few wealthy aristocratic families until a military coup in 1968 when the country became a military dictatorship, under General Omar Torrijos whose reforms helped to create a strong middle class. His lasting legacy was the signing of the Torrijos Carter Treaties in 1977 which allowed for the gradual handover of the Canal and its territory to Panama by the end of 1999. Torrijos was killed in a helicopter crash in 1981 in what many still believe were suspicious circumstances.
His place was taken by General Manuel Antonio Noriega under whose regime relations with the U.S. deteriorated so badly that the U.S. finally invaded Panama in 1989 and Noriega was transferred to the U.S. and tried, convicted and jailed on drug charges.
From that time until the present day, Panama has increasingly prospered under a series of democratically elected presidents.