In 1777 George Washington lost the Battle of Germantown and Philadelphia was occupied by British troops. They left in 1778. After the war was won, a Constitutional Convention (United States) met in Philadelphia in 1787 to write the United States Constitution which states the most important laws of the United States.