The U.S. Constitution was written during the Constitutional Convention held in Philadelphia from May 25 to September 17, 1787. The document was signed on September 17, 1787, by 39 of the 42 delegates present at the convention. After the signing, the Constitution was sent to the states for ratification. A total of nine states needed to ratify the Constitution for it to become effective. Delaware was the first state to ratify it on December 7, 1787, and New Hampshire became the ninth state to ratify on June 21, 1788, which officially established the Constitution as the framework of the new government. The last state, Rhode Island, ratified the Constitution on May 29, 1790. The new government under the Constitution began operating on March 4, 1789.