After serving as a soldier (1754–59) in the war against the French, Washington took part in two of the three Continental Congresses held by the American colonies in revolt against British rule (1774 and 1775), and in 1775 was chosen as commander of the army raised by the colonists, the Continental Army. He served in that capacity throughout the War of Independence, bringing about the eventual American victory by keeping the army together through the bitter winter of 1777 to 1778 at Valley Forge and winning a decisive battle at Yorktown (1781). Washington chaired the convention at Philadelphia (1787) that drew up the American Constitution, and two years later he was unanimously elected President, initially remaining unaligned to any of the newly emerging political parties but later joining the Federalist Party. He served two terms, following a policy of neutrality in international affairs, before declining a third term and retiring to private life.