Elected President of the Continental Congress at age 32, John Jay was a bright and capable lawyer from a well-to-do New York merchant family. On September 27, 1779, Jay was appointed Minister to the Spanish Court and entrusted with the task of obtaining support for the American cause and recognition of American independence. There were reasons to hope that Jay might succeed. The monarchies of Spain and France were linked together by the Bourbon Family Compact. Spain had longstanding colonial grievances against Great Britain, especially British control of the strategic Mediterranean fortress of Gibraltar. On April 12, 1779, Spain secretly agreed to join France in waging war on the British, but unlike the French, the Spanish declaration of war on June 21, 1779, did not include recognition of American independence or agreement to fight Britain until America was independent. Still Jay seemed the ideal candidate to win over the court at Madrid to the American cause. Tall, slender, well- spoken, and with a streak of stubborn determination, Jay spent more than 2 frustrating years in Madrid. He was effectively cut off from the court, existing in good part upon occasional, grudging donations from the principal Spanish minister, the Conde de Floridablanca. Although no friend to Britain, Floridablanca worried about American claims to lands west of the Appalachians and navigation rights on the Mississippi River and feared that the flames of the American revolution might spread to Spanish colonies in the Americas. Although Jay failed with Spain, he became a Peace Commissioner in Paris. He helped to negotiate the peace with Great Britain ending the War for Independence. After the war, Jay declined the post of Minister to Great Britain, but accepted the draft of the Continental Congress to become its Secretary of Foreign Affairs responsible for the foreign relations of the new American nation.