What are the relevant historic issues in Ecuador's foreign policy?
Ecuador's diplomatic history has focused strategically on the preservation of sovereign territory and resources; politically on the amplification of its national prestige and influence through multilateral institutions and economically on the promotion of national trade through close relationships with the United States, the Andean Community, and to a lesser extent with the rest of Latin America.
Since the formation of the Republic in 1830, Ecuador and Peru have fought over a large portion of the Amazon rainforest. This conflict broke out into open warfare at least five times, once in 1829, 1859, 1941, 1981, and 1995 for an average of once every 41 years. Ecuador lost approximately 200,000 km² in 1942 under the unpopular (in Ecuador) Rio Protocol. Conflict broke out most recently in 1995 during the so called Cenepa War, lasting for a little longer than a month. The conflict reaffirmed the status quo of Peru's sovereignty over the territory and was codified in a 1998 agreement arbitrated by Argentina, Brasil, Chile, and the United States that included a few symbolic concessions for Ecuador, including the permanent leasing of one square kilometer of territory around Tiwintza in the Peruvian Amazon.
Outside of it territorial conflicts with Peru, Ecuador has a history of problems along its northern border with Colombia where the guerrilla war between the Colombian state and the FARC has sporadically spilled over into Ecuador territory. At these times, Colombia and the FARC have both violated Ecuadorian territory. Guerillas have crossed Ecuador's borders seeking safe sanctuary from Colombian troops periodically leading to cross border attacks by that country's military as well as Colombian fumigation of coca crops that it claims the FARC uses to help fund its operations. 
Finally, Ecuador maintains sovereignty over a 200 nautical mile zone offshore of its continental and island territories. The claim predates the 1982 United Nations Convention on the Law of the Sea establishing at most a 12 mile limit on offshore claims. The dispute remains unresolved and has periodically caused tensions between Ecuador and the international community. Under various Velasco administrations between 1955 and the early 1970s, Ecuador seized fishing ships that violated this 200 nautical mile limit and fined them. The seizure of two US tuna ships in 1955 resulted in what is known as the 'Tuna Wars' between Ecuador and the US. The United States protested the seizures and has protested Ecuador's maritime claims in 1967, 1986 and 1992 and conducted operational assertions in 1979, 1980, 1985-87, 1989-1994, 1999 and 2000.
Ecuador's political history has had a major effect on its diplomatic efforts. Recurring cycles of internal instability and short governmental administrations have made the execution of any long term policy very difficult. According to some sources Ecuador has had 95 different governments in its 178 years of independence, meaning that each administration lasted on average 1.8 years.
In the absence of a strong executive with clear policies, the Foreign Ministry has maintained a limited policy agenda that focused on certain key areas favoring the interests of Ecuadorians. These include the principle of non-intervention and national sovereignty, insistence on the rule of law and the rejection of the threat of force in international affairs. These principles manifest themselves in Ecuador's active participation in multilateral institutions, especially within Latin America and a willingness to enter into strategic alliances with stronger powers, like the US.
While these methods are the major vehicles for the execution of Ecuador's policy agenda, the historical variety of executives has influenced the extent to which they were followed. This has been most obvious during administration when the executive was willing to use violence as a political tool or to allow foreign interests to intervene in its internal affairs.
This willingness to resort to violence was seen in the border dispute with Peru where violent conflict broke out as recently as 1995. The rejection of the 1942 internationally mediated treaty also showed a lack of respect for the rule of law, another principle of foreign policy. It declared war on Japan during the Second World War and has seized foreign ships as a means of imposing its 200 nautical mile claim in the Ecuadorian Pacific. Most recently the president authorized the deployment of troops along the Colombian border after Colombian troops attacked a FARC base camp in Ecuadorian territory.
In terms of Ecuador's willingness to allow foreign intervention in internal affairs, the most obvious examples stem from its love/hate relationship with the United States. In 1908 Eloy Alfaro (1842-1912) was accused of "delivering the republic to the Yankees" after signing a contract with a US company to complete the Quito-Guayaquil railroad begun by president Garcia Moreno's (1821-1875). Although this project continued, Alfaro was forced to end negotiations with the US after nationalistic uprisings over a planned US military base in the Galapagos Islands.
In the 1920s a group of advisors from Princeton University helped reorganize the fiscal and monetary structures of Ecuador's economy. In 1942s Ecuador declared war against Japan and granted the US permission to build military bases in the Galapagos islands and the coastal city of Salinas in exchange for military equipment and the withdrawal of support from the US based South American Development Company, a mining company in a wage dispute with the Ecuadorian government.
The post World War II era brought two influential economic booms that furthered Ecuador's dependence on the US, the banana boom of 1948-1959 and the current oil boom that began in the 1970s. The US was the largest importer of Ecuadorian products during this period leaving Ecuador vulnerable to the often overt intervention of the US.
Ecuador economy has always relied on the export of primary products. From the colonial period until the 21st century Ecuador, foreign trade has had a preponderant affect on the internal policies of the country. Not surprisingly, if you look at the rise and fall of the average annual price of Ecuador's principal export on the international market during the twentieth century (first cacao, then bananas, and most recently oil) and compare that to the years in which there were coup d'états, there seems to be a direct correlation between political stability and the boom/bust cycle.
Cacao was the country's main export until the 1920s. This boom period corresponded to one of the longest democratic periods of governance in Ecuador's history, with four democratic transfers of power between 1912 and 1925. The sharp drop in the international price of cacao in the 1920s left Ecuador without a stable income source and precipitated a military coup in 1925.
The country had 14 presidents in the 1930s and oscillated between civilian and military control of the government in the 1940s. Instability continued until the election of President Galo Plaza in 1948 who himself attributed his success to the beginning of the banana boom. This period of democratic governance and political stability lasted until the price of bananas dropped in 1959.
After the drop in banana exports, public discontent became visible immediately. There were a series of labor riots protesting the government's economic policies and by 1960 Velasco Ibarra (1893-1975), a five time president famous for his populism and poor economic policies, was elected president a fourth time by promising a quick fix to the nation's problems. His inability to fulfill these promises led to a quick military coup in 1961, thus setting off another period of political instability. There would be seven more coup d'états by 1976.
A military government ruled between 1972 and 1979. During this time they managed to consolidate their power over national politics through control of petroleum exports and transform Ecuador from a banana republic to a major petroleum exporting banana republic.
Even though Ecuador exported enough oil to become a member of OPEC in 1973, the military was unable to capitalize on the increased revenue to improve conditions at home. By 1976 it suffered an internal coup and was replaced by a new military junta whose main priority was holding new elections to transfer power to civilian rule.
Energy prices began to fall in 1980 and dropped sharply in 1986. This, along with a series of natural disasters including flooding from the El Niño climatic effect, an earthquake, and blight that hit shrimp farms and another that affected rose production caused poor economic performance and frequent disputes between the Executive and the National Congress.Interestingly, while there were no successful coup d'etats in the 1980s, power oscillated in a constant 'back and forth' between presidents from the coast and the sierra in a continuation of the historic rivalries that exist between the 'liberal' coast with Guayaquil at its center and the more 'conservative' capital of Quito in the sierra. This situation continued throughout the 1980s and 1990s but has favored coastal candidates in the 21st century.
Below is a table that graphs the 2007 inflation adjusted average annual price of crude oil in the US with instances of coup d'etats in Ecuador between 1960 and 2008. 
By the time Ecuador became a member of OPEC in 1973 the rising price of oil gave the government more economic breathing space. The 1976 coup came from an internal dispute over the military's role in politics rather than an expression of popular discontent; however, the poor handling of the economy was the impetus for the internal division.
The transition to civilian rule in 1979 and the following 18 years of democratic transitions correspond to an increase in oil prices. However, the two failed coups of 1987 followed six straight years of falling prices and the drastic drop in the price of oil in 1986.
Oil prices fell again in 1998 to their lowest point in 24 years, followed shortly thereafter by a national banking crisis and the decision to dollarize in 1999. The strain was too great on Ecuadorian society and in 2000 a military coup ousted President Jamil Mahuad followed by another coup to remove the military. The then Vicepresident Gustavo Noboa assumed power and completed Mahuad's term.
By Nathan Gill - Southern Affairs
 Library of Congress. A Country Study: Ecuador. Library of Congress Call Number F3708 .E383 1991. Online. 2 May 2008
 Carrión, Francisco. Personal Interview. Quito 28 Jan. 2008
 Ibid - LOC
 US Department of Defense. Ecuador: Summary of Claims DOD 2005. 1-M. 2005. 3 May 2008
 Ibid - LOC
 Ecuadorian Ministry of Foreign Relations. National Foreign Policy Plan 2006-2020. Quito Oct. 2006
 Ibid - LOC
 Ibid - LOC
 Ibid - LOC
 Ibid - LOC
 Ibid - LOC
 In recognition of his great charisma Velasco once famously said, "Give me a balcony and I will become president." Reid, Michael. Forgotten Continent: The Battle for Latin America's Soul. Yale Univ Press. London 2007: 79
 Ibid - LOC
 Data compiled from InflationData.com. Historical Crude Oil Prices (Table). and Da Graca, John V. Heads of State and Government. 2nd ed. MacMillan Press. 2000