On September 17, 1787, 39 delegates signed the Constitution of the United States in the Pennsylvania State House in Philadelphia. Fifty-five had attended at one point or another over four months. Three of those present refused to sign: Edmund Randolph, George Mason and Elbridge Gerry. Benjamin Franklin, who was 81 and had to be carried in, said he had doubts and would sign anyway.
The convention had been called to revise the Articles of Confederation, under which Congress could not tax, could not regulate trade between the states, and could not make states obey treaties. It produced a different thing. What came out was a government that could act on individuals rather than on states: a Congress with two houses, one apportioned by population and one with two members per state, an executive chosen by electors rather than by the legislature, and federal courts. Neither the Articles nor the states were consulted about the change.
The arguments were about power and about who would hold it. The large states wanted representation by population, the small states wanted one vote each, and the Connecticut Compromise settled it with a House apportioned by population and a Senate with equal votes, with each state's electoral votes equal to its seats in both. The three-fifths clause counted three of every five enslaved people for both representation and direct taxes, and it was a bargain between the South, which wanted the numbers, and the North, which did not want to pay tax on them. The slave trade was protected from prohibition until 1808.
Ratification was the real fight. It was not certain. The document needed nine of thirteen states, and the Federalists, who had won the wording, lost much of the argument: Patrick Henry and George Mason in Virginia, and the Anti-Federalist writers elsewhere, attacked the absence of a bill of rights, the size of the republic and the taxing power. Delaware went first, on December 7. Massachusetts ratified in February 1788 only after a deal on amendments. Virginia and New York followed that summer once the first Congress promised them.
The promise was kept. James Madison, who had argued against a bill of rights in 1788, drafted twelve amendments in 1789 and ten were ratified by 1791. The government under the new frame started in March 1789. The Constitution has been amended 17 more times since, and the three-fifths clause was replaced by the Fourteenth Amendment in 1868.