The United States Constitution was written in the summer of 1787 in Philadelphia, Pennsylvania. It was drafted by delegates from 12 of the 13 states during the Constitutional Convention, which convened from May 25 to September 17, 1787. The Constitution was signed on September 17, 1787, in Independence Hall, Philadelphia. The document created a federal system of government with separated powers between three branches and replaced the Articles of Confederation as the governing framework of the United States.