Costa Rica–Mexico relations peaceful resolution. This was known as the "Pacto de la embajada de México". The war ended in April 1948 and Costa Rica entered into its 'Second Republic.' During the central-American wars taking place in neighboring El Salvador, Guatemala and Nicaragua; both Costa Rica and Mexico led mediation dialogues between warring factions in each nation in order to bring peace and stability to the region. Mexico (along with Colombia, Panama and Venezuela) created the Contadora Group which helped create the framework for the Esquipulas Peace Agreement, led by Costa Rica's President Oscar Arias. Presidential visits from Costa Rica to Mexico Presidential
Costa Rica played a key role in Costa Rica's history and in 2006, was the third cash crop export. As a small country, Costa Rica now provides under 1% of the world's coffee production. In 2015, the value of coffee exports was US$305.9 million, a small part of the total agricultural exports of US$2.7 billion. Coffee production increased by 13.7% percent in 2015-16, declined by 17.5% in 2016–17, but was expected to increase by about 15% in the subsequent year. Costa Rica has developed a system of payments for environmental services. Similarly, Costa Rica has a tax on water pollution to penalize