The Constitution of the United States established America’s national government and fundamental laws, and guaranteed certain basic rights for its citizens.

It was signed on September 17, 1787, by delegates to the Constitutional Convention in Philadelphia. Under America’s first governing document, the Articles of Confederation, the national government was weak and states operated like independent countries. At the 1787 convention, delegates devised a plan for a stronger federal government with three branches—executive, legislative and judicial—along with a system of checks and balances to ensure no single branch would have too much power.

READ MORE: How the Constitution Has Changed and Expanded Since 1787

The Preamble to the U.S. Constitution

The Preamble outlines the Constitution's purpose and guiding principles. It reads:

"We the People of the United States, in Order to form a more perfect Union, establish Justice, insure domestic Tranquility, provide for the common defense, promote the general Welfare, and secure the Blessings of Liberty to ourselves and our Posterity, do ordain and establish this Constitution for the United States of America."

The Bill of Rights were 10 amendments guaranteeing basic individual protections, such as freedom of speech and religion, that became part of the Constitution in 1791. To date, there are 27 constitutional amendments.

READ MORE: Why Does the Constitution Include the Bill of Rights?

Articles of Confederation

America’s first constitution, the Articles of Confederation, was ratified in 1781, a time when the nation was a loose confederation of states, each operating like independent countries. The national government was comprised of a single legislature, the Congress of the Confederation; there was no president or judicial branch.

The Articles of Confederation gave Congress the power to govern foreign affairs, conduct war and regulate currency; however, in reality these powers were sharply limited because Congress had no authority to enforce its requests to the states for money or troops.

Did you know? George Washington was initially reluctant to attend the Constitutional Convention. Although he saw the need for a stronger national government, he was busy managing his estate at Mount Vernon, suffering from rheumatism and worried that the convention wouldn't be successful in achieving its goals.

Soon after America won its independence from Great Britain with its 1783 victory in the American Revolution, it became increasingly evident that the young republic needed a stronger central government in order to remain stable.

In 1786, Alexander Hamilton, a lawyer and politician from New York, called for a constitutional convention to discuss the matter. The Confederation Congress, which in February 1787 endorsed the idea, invited all 13 states to send delegates to a meeting in Philadelphia.

Forming a More Perfect Union

On May 25, 1787, the Constitutional Convention opened in Philadelphia at the Pennsylvania State House, now known as Independence Hall, where the Declaration of Independence had been adopted 11 years earlier. There were 55 delegates in attendance, representing all 13 states except Rhode Island, which refused to send representatives because it did not want a powerful central government interfering in its economic business. George Washington, who’d become a national hero after leading the Continental Army to victory during the American Revolution, was selected as president of the convention by unanimous vote.

The delegates (who also became known as the “framers” of the Constitution) were a well-educated group that included merchants, farmers, bankers and lawyers. Many had served in the Continental Army, colonial legislatures or the Continental Congress (known as the Congress of the Confederation as of 1781). In terms of religious affiliation, most were Protestants. Eight delegates were signers of the Declaration of Independence, while six had signed the Articles of Confederation.

At age 81, Pennsylvania’s Benjamin Franklin (1706-90) was the oldest delegate, while the majority of the delegates were in their 30s and 40s. Political leaders not in attendance at the convention included Thomas Jefferson (1743-1826) and John Adams (1735-1826), who were serving as U.S. ambassadors in Europe. John Jay (1745-1829), Samuel Adams (1722-1803) and John Hancock (1737-93) were also absent from the convention. Virginia’s Patrick Henry (1736-99) was chosen to be a delegate but refused to attend the convention because he didn’t want to give the central government more power, fearing it would endanger the rights of states and individuals.

Reporters and other visitors were barred from the convention sessions, which were held in secret to avoid outside pressures. However, Virginia’s James Madison (1751-1836) kept a detailed account of what transpired behind closed doors. (In 1837, Madison’s widow Dolley sold some of his papers, including his notes from the convention debates, to the federal government for $30,000.)

Debating the Constitution

The delegates had been tasked by Congress with amending the Articles of Confederation; however, they soon began deliberating proposals for an entirely new form of government. After intensive debate, which continued throughout the summer of 1787 and at times threatened to derail the proceedings, they developed a plan that established three branches of national government–executive, legislative and judicial. A system of checks and balances was put into place so that no single branch would have too much authority. The specific powers and responsibilities of each branch were also laid out.

Among the more contentious issues was the question of state representation in the national legislature. Delegates from larger states wanted population to determine how many representatives a state could send to Congress, while small states called for equal representation. The issue was resolved by the Connecticut Compromise, which proposed a bicameral legislature with proportional representation of the states in the lower house (House of Representatives) and equal representation in the upper house (Senate).

Another controversial topic was slavery. Although some northern states had already started to outlaw the practice, they went along with the southern states’ insistence that slavery was an issue for individual states to decide and should be kept out of the Constitution. Many northern delegates believed that without agreeing to this, the South wouldn’t join the Union. For the purposes of taxation and determining how many representatives a state could send to Congress, it was decided that enslaved people would be counted as three-fifths of a person. Additionally, it was agreed that Congress wouldn’t be allowed to prohibit the slave trade before 1808, and states were required to return fugitive enslaved people to their owners.

READ MORE: 7 Things You May Not Know About the Constitutional Convention

Ratifying the Constitution

By September 1787, the convention’s five-member Committee of Style (Hamilton, Madison, William Samuel Johnson of Connecticut, Gouverneur Morris of New York, Rufus King of Massachusetts) had drafted the final text of the Constitution, which consisted of some 4,200 words. On September 17, George Washington was the first to sign the document. Of the 55 delegates, a total of 39 signed; some had already left Philadelphia, and three–George Mason (1725-92) and Edmund Randolph (1753-1813) of Virginia, and Elbridge Gerry (1744-1813) of Massachusetts–refused to approve the document. In order for the Constitution to become law, it then had to be ratified by nine of the 13 states.

James Madison and Alexander Hamilton, with assistance from John Jay, wrote a series of essays to persuade people to ratify the Constitution. The 85 essays, known collectively as “The Federalist” (or “The Federalist Papers”), detailed how the new government would work, and were published under the pseudonym Publius (Latin for “public”) in newspapers across the states starting in the fall of 1787. (People who supported the Constitution became known as Federalists, while those opposed it because they thought it gave too much power to the national government were called Anti-Federalists.)

Beginning on December 7, 1787, five states–Delaware, Pennsylvania, New Jersey, Georgia and Connecticut–ratified the Constitution in quick succession. However, other states, especially Massachusetts, opposed the document, as it failed to reserve un-delegated powers to the states and lacked constitutional protection of basic political rights, such as freedom of speech, religion and the press.

In February 1788, a compromise was reached under which Massachusetts and other states would agree to ratify the document with the assurance that amendments would be immediately proposed. The Constitution was thus narrowly ratified in Massachusetts, followed by Maryland and South Carolina. On June 21, 1788, New Hampshire became the ninth state to ratify the document, and it was subsequently agreed that government under the U.S. Constitution would begin on March 4, 1789. George Washington was inaugurated as America’s first president on April 30, 1789. In June of that same year, Virginia ratified the Constitution, and New York followed in July. On February 2, 1790, the U.S. Supreme Court held its first session, marking the date when the government was fully operative.

Rhode Island, the last holdout of the original 13 states, finally ratified the Constitution on May 29, 1790.

The Bill of Rights

In 1789, Madison, then a member of the newly established U.S. House of Representatives, introduced 19 amendments to the Constitution. On September 25, 1789, Congress adopted 12 of the amendments and sent them to the states for ratification. Ten of these amendments, known collectively as the Bill of Rights, were ratified and became part of the Constitution on December 10, 1791. The Bill of Rights guarantees individuals certain basic protections as citizens, including freedom of speech, religion and the press; the right to bear and keep arms; the right to peaceably assemble; protection from unreasonable search and seizure; and the right to a speedy and public trial by an impartial jury. For his contributions to the drafting of the Constitution, as well as its ratification, Madison became known as “Father of the Constitution.”

To date, there have been thousands of proposed amendments to the Constitution. However, only 17 amendments have been ratified in addition to the Bill of Rights because the process isn’t easy–after a proposed amendment makes it through Congress, it must be ratified by three-fourths of the states. The most recent amendment to the Constitution, Article XXVII, which deals with congressional pay raises, was proposed in 1789 and ratified in 1992.

READ MORE: 8 Things You Should Know About the Bill of Rights

The Constitution Today

In the more than 200 years since the Constitution was created, America has stretched across an entire continent and its population and economy have expanded more than the document’s framers likely ever could have envisioned. Through all the changes, the Constitution has endured and adapted.

The framers knew it wasn’t a perfect document. However, as Benjamin Franklin said on the closing day of the convention in 1787: “I agree to this Constitution with all its faults, if they are such, because I think a central government is necessary for us… I doubt too whether any other Convention we can obtain may be able to make a better Constitution.” Today, the original Constitution is on display at the National Archives in Washington, D.C. Constitution Day is observed on September 17, to commemorate the date the document was signed.