In the last days of June 1787, a heat wave began to descend on Philadelphia. For years, scholars have quibbled about how hot it really became -- whether it was the worst summer on record, the second worst, or not really that bad after all.

The issue is not entirely academic to the story of the Constitutional Convention, which was meeting there then, for in that same week the mood of the delegates grew foul, and it would be only human for the heat to have had something to do with it. There they were, 30 or so middle-aged men sitting in "close confinement," as one put it, burdened by layers of clothing as the temperatures reached the nineties, listening to each other talk day after day for hours on end.

Also getting on their nerves was rasping of wagon wheels on the rounded stones of the streets near the State House. The convention had sent a request over to the city fathers for a load of gravel to spread on the streets to cushion the noise, but only so much could be done.

Whatever the contributing causes, something snapped in the sixth week of the convention as the delegates again confronted the most explosive issue before them -- representation in the proposed U.S. Congress. Tempers flared. Ultimatums escalated. Nerves grew brittle.

Old Ben Franklin tried to intervene, to cool everyone down, but things only got worse. Unspeakable thoughts -- threats of breaking up the Union -- were spoken. And some began seriously to think that the whole enterprise might self-destruct.

It was, for many, a sobering experience, causing some to rethink their positions. As a result, for the first time, they moved toward a resolution of their differences on this crucial question.

The sixth week thus became the most decisive week of the convention, dramatically reshaping the government it was designing. At the beginning, James Madison and his staunchest allies were in firm control of events. By the end, they were all but isolated in their intransigence, and control had shifted to the conciliators, like Franklin.

"When a broad table is to be made and the edges of the planks do not fit," said Franklin of the new government they were struggling to create, "the artist takes a little from both, and makes a good joint. In like manner here, both sides must part with some of their demands, in order that they may join in some accommodating proposition."

For Madison, it was a painful episode: It was his "broad table" Franklin was talking about.

The trouble began on June 27. Once before, the convention had given Madison an easy triumph in the controversy over power in the new Congress by agreeing that both the House and the Senate would be based on proportional representation -- on the size of each state.

The first round of the convention votes were only informal, however, and all issues, including this one, had to be reconsidered formally. Another drive by the small states to undo Madison's victory was expected -- but the Virginian had every reason to be confident of the result -- as he had been all along.

Luther Martin of Maryland now asked to be recognized. Martin's politics, his deep suspicions about the large states and about Madison's intentions, were well known by then. But the volatile Marylander, who had arrived late at the convention, had remained, for him, subdued.

He had not been inactive, however. Martin had been consuming much energy scurrying around to libraries in Philadelphia, arming himself to do battle against Madison's plan of government, procuring, as he later recalled, "everything the most valuable I could find in Philadelphia on the subject of governments in general, and on the American revolution and governments in particular."

When Martin took the floor, he began regurgitating all he had learned, reading at length from all the great thinkers, passages from John Locke, Joseph Priestly, John Somers, Emmerich Von Vattel and anyone else he could think of. On and on he talked -- for the entire day -- ceasing only after reaching exhaustion. Then he announced that he would resume the next day, which he did. On he went the next day, apparently well into the afternoon.

Madison, whose biased account of Martin's performance is nevertheless the most complete, noted that the marathon ordeal "was delivered with much diffuseness and considerable vehemence." The other reviews were equally negative. "This gentleman possesses a good deal of information," William Pierce of Georgia wrote sarcastically of Martin's filibuster, "but he has a very bad delivery, and is so extremely prolix, that he never speaks without tiring the patience of all who hear him."

After Martin sat down, Madison, instead of giving everyone a rest, felt compelled to refute Martin point by point. His speech, too, became an endless treatise, on the history of Carthage, of Rome, on the Heroic Age of Ancient Greece, the "existing condition of the American savages," and "the condition of the lesser states in the German Confederacy."

When it was all over, two full days had passed and tempers were frayed.

Franklin now asked for the floor. Franklin had a habit in the convention of intervening at particularly hazardous junctures, usually with comments and proposals that seemed irrelevant to the others. There was a method to Franklin's interjections, however, for they always came when the combat was getting out of hand, when he felt things needed cooling down. No matter how far-fetched his proposals were, he knew that because of who he was, the others would stop and listen respectfully and thus pause in the heat of battle.

"The small progress we have made after four or five weeks' close attendance and continual reasonings with each other," Franklin now said, "is methinks a melancholy proof of the imperfection of human understanding . . . . How has it happened, sir, that we have not hitherto once thought of humbly applying to the Father of lights to illuminate our understandings . . . . " He talked for a while and then came to the point: He moved that a prayer be said each morning in the convention "imploring the assistance of Heaven and its blessings on our deliberations."

A good deal of hemming and hawing ensued, Madison's notes suggest. These men were in no mood for prayers. But no one wanted to come flat out and oppose the motion or the venerable Franklin. Ultimately, Madison reported, "after several unsuccessful attempts for silently postponing the matter by adjourning, the adjournment was at length carried, without any vote on the {Franklin's} motion."

Over the next few days, as the convention headed for a final vote on representation in the Senate, the delegates became more belligerent, the rhetoric more feverish.

Oliver Ellsworth of Connecticut declared that if the large-state delegates refused to allow an equal vote in at least one house, the convention, and, for that matter, the union of the states, was finished.

Wilson of Pennsylvania shot back: " . . . If a separation must take place, it could never happen on better grounds . . . . If the issue must be joined, it is on this point that I would choose to join it."

"The large states dare not dissolve the Confederation," declared Gunning Bedford of Delaware. "If they do, the small ones will find some foreign ally of more honor and good faith, who will take them by the hand and do them justice."

Rufus King of New York said he was "grieved that such a thought" should enter into anyone's heart and even "more grieved that such an expression dropped" from the "honorable gentleman's" lips. "The gentleman could only excuse it to himself on the score of passion."

It was Saturday, June 30. The convention recessed.

The first item on Monday was the vote on the motion to allow each state one vote in the Senate, the same motion Madison and the large states had so handily defeated when last confronted and expected on this morning to defeat again.

A half-century later, when an aged Madison prepared his account of the convention for posthumous publication, this must have been the hardest moment to relive. It was one thing to lose a contest on the merits -- but freakish to lose it because someone was out of the room, and someone else had left town, and some obscure figure changed his vote. But that was exactly what happened when the roll was called and two crucial states -- Maryland and Georgia -- voted differently than they had the last time.

Maryland had only two delegates present at this point in the convention, Luther Martin and Daniel of St. Thomas Jenifer. On the last vote, the two had split, nullifying Maryland's vote. This time, however, Jenifer was inexplicably absent from the room and Martin controlled Maryland's vote.

Martin -- and Maryland -- voted aye, against Madison.

Georgia had been solidly behind proportional representation the last time. But since then, two of its delegates had departed for New York to participate in a congressional debate on what was to become the Northwest Ordinance, leaving only two delegates present: William Houstoun and Abraham Baldwin, both of whom had been on Madison's side the last time.

This time, however, Baldwin switched without explanation, voting in favor of the motion. This time, Georgia's vote was split -- and thus not counted.

The result was a tie vote on representation in the Senate -- and the convention was deadlocked.

"We are now," said Roger Sherman of Connecticut, "at a full stop."

Whether it was the heat of the debates that moved people, or just the heat, or the narrowness of the vote and the certainty of further dissension -- whatever it was, suddenly men who had been totally uncompromising in their support of Madison's position, men like Gouverneur Morris of Pennsylvania and even Edmund Randolph of Virginia, began to abandon him and to talk of compromise.

Suddenly a motion was on the floor to appoint a committee of a delegate from each state to go behind closed doors and compromise. Madison and James Wilson of Pennsylvania objected bitterly -- knowing from their experience in the Confederation Congress that such committees were always stacked, and that the vote on the committee in the convention would, in fact, signal their defeat. Their arguments were ignored, however, and they watched in dismay as the committee was created and its members elected by the convention.

Madison and Wilson were pointedly excluded from committee membership. Mason, a moderate, took Virginia's seat in the select group; Franklin, the conciliator, took Pennsylvania's. They were joined by, among others, Luther Martin of Maryland, Bedford of Delaware and Baldwin of Georgia -- the one who had switched his vote earlier in the day. The committee began meeting July 3 -- with the outcome -- a compromise -- all but secured.

What force had moved the delegates? Probably fear. In the six weeks they had been meeting, many had come to believe that the convention was the country's last chance, "the last appeal to a regular experiment," as South Carolina's Charles Pinckney expressed it.

The war that had unified America was four years over. Absent some new bond, how long would the nation last? "As yet," Alexander Hamilton had said earlier in the convention, "we retain the habits of union . . . . Henceforward, the motives will become feebler, and the difficulties greater. It is a miracle that we are here now exercising our tranquil and free deliberations.

"It would be madness to trust to future miracles." NEXT Monday: The compromise unveiled