In March 1948, Costa Rica entered into a civil war. During the war, the ambassadors of Chile, Mexico, Panama and the United States met at the premise of the Mexican embassy in San José and agreed to mediate between both belligerents of the war to bring them to a 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.'