(CNN) -- Behind closed doors during a stifling Philadelphia summer, a group of men drafted the document that became the cornerstone of American government for the next two centuries and the world's oldest written national constitution.

New Hampshire became the ninth state -- and final vote needed -- to approve the document on June 21, 1788, thereby officially ratifying the U.S. Constitution and springing the new government into action.

"We're talking about a constitution that is in its third century. That's really quite remarkable among any of the nations of the world," said A. E. Dick Howard, a professor at the University of Virginia School of Law and constitutional consultant to countries around the globe. "It suggests an essential stability of our political system that many may envy but not many can emulate."

The Constitution's purpose is simple: Outline how the U.S. government works and the basic rights of individuals. It lays out three branches of government -- the executive, legislative and judicial. In what seems commonplace now, but unprecedented then, each branch would operate separately, keeping a system of checks and balances over the other.

"Throughout our history, there has been an ebb and flow of one branch being a little more powerful, the president getting a little more power, then congress being more powerful," explained Kenneth Davis, author of the best-seller "Don't Know Much About History."

"But it's that flexibility, that elasticity of the Constitution that allows for that, and so that's part of its extraordinary brilliance that has allowed it to last as long as it has."

The art of compromise

But creating the Constitution was anything but certain or easy. In 1787, delegates from 12 of the 13 states at the time met in Philadelphia, Pennsylvania, at what is now known as Independence Hall. (No representatives from Rhode Island attended.)

Although some of the most prominent figures of the day were present -- including George Washington, James Madison, and Benjamin Franklin -- there were notable absences. Thomas Jefferson and John Adams were overseas and Patrick Henry refused to attend because he "smelt a rat," fearing a strong federal government would take away too much power from states.

Charged with amending the Articles of Confederation -- a document that loosely tied the states together -- the convention delegates soon realized they needed to start from scratch.

Despite the summer heat, windows and doors of the meeting room remained shut to keep the proceedings secret from reporters and visitors. In the stifling atmosphere, the delegates argued over dozens of issues: How would the states be represented? Why and how would the new government's chief executive be different from a king? Would senators and judges be appointed for life?

"Because the issues debated at the convention were very contentious and very divisive, it's easy to imagine that people of lesser stature could have foundered, that the whole enterprise might have died," Howard said.

"A lot of Americans have some view of the Constitution as just this thing that was handed down [intact]," agreed Davis. "But it really was the result of months and months of wrangling and disputation and ultimately compromise. That's where the brilliance of the American system is -- it's always been built on compromise."

Most of the delegates signed the Constitution September 17, 1787, but it would be more than nine months later before it was officially ratified.

Among the most combative issues was the question of state representation, Davis said.

Large states wanted representation based on population, while small states believed only equal representation would be fair. Complicating the debate was the request of Southern states to count slaves when deciding on population-based representation.

Ultimately, the delegates reached what is now known as "The Great Compromise." Representation for one chamber would be based on population, including three-fifths of "all other persons," a euphemism for slaves. Another chamber would have equal representation, two members for each state. And so the House of Representatives and the Senate, respectively, were born.

But some issues were not resolved at the convention and did not make it into the original Constitution.

"I would guess the biggest single omission -- and we later paid a huge price for it -- was the problem of slavery," Howard said. "[The delegates] thought that getting the union going was more important than solving the slavery problem.

"But of course, after some decades passed, we had sectional division that led to the American Civil War."

Patriarch of constitutions

Knowing that requiring unanimous ratification from the states carried a huge risk for failure, the delegates agreed that only nine of the 13 states had to ratify the Constitution for it to become legal.

But even getting nine states to give the Constitution the green light was far from certain, according to Linda Monk, author of the Constitution explainer "The Words We Live By." The lack of a Bill of Rights kept many states dragging their feet on ratification.

"It seems strange to us today: Why wouldn't the framers want to put freedom of speech and freedom of religion in the Constitution?" Monk said. "What the consensus seems to be is that many of them didn't think it was necessary. They thought the states' bills of rights would be sufficient."

A promise of a national Bill of Rights and pro-Constitution articles later known as the Federalist Papers helped spur official ratification, although the vote remained close in many states.

I think because we have no monarchy ... the Constitution is the common ground for all Americans.

-- A. E. Dick Howard

As the patriarch of constitutions, the U.S. document would influence other nations for years and began the modern constitutional era, Howard said, adding that the Constitution also remains a powerful symbol for Americans.

"I find it interesting that in my travels, I find no country in the world in which their constitution is as much a part of the popular mentality as it is in the United States," he said. "I think because we have no monarchy, [and] we don't have any other symbol of the country like some countries do, the Constitution is the common ground for all Americans."

Today, the United States continues to grapple with some of the same issues the Founding Fathers faced: the balance of power between states and the federal government, the separation of church and state, and personal rights protection.

But Monk said the Constitution's framers knew the document wasn't perfect, and included an amendment process provision still in use today.

"Some people say Article 5 that sets forth the amendment process is in fact the secret to the Constitution's success," she said. "It makes adding an amendment not too hard, but not too easy."

But, she said, the ultimate responsibility of any change to the Constitution rests with all American citizens, not just politicians.

"In all my talks, I end by reciting the [Constitution's] preamble because I think those are words we should all live by: 'We the people ... do ordain and establish this Constitution,'" said Monk, who has spoken at the Library of Congress and the National Archives. "I think that's what gives the Constitution meaning."