Congress was slow to take action of any kind. In January, 1791, Maclay noted that a committee had decided that the Mediterranean trade could not be preserved without an armed force to protect it, and that a navy should be established as soon as the Treasury was in a position to bear the expense. Meanwhile the President began fresh negotiations, which were attended by singular fatality. Thomas Barclay, who had some diplomatic experience, was commissioned to go to the Emperor of Morocco. When Barclay reached Gibraltar, he was taken ill, and, after being removed to Lisbon, he died. Admiral John Paul Jones was then appointed special commissioner to arrange for the ransom of the captives. As he had then left the Russian service and was living in Paris, it was supposed that his services would be available, but he died before the commission could reach him. The delay caused by these events was made so much worse by the slow transmission of intelligence that two years elapsed before a fresh start was made by placing the conduct of matters in the hands of Colonel David Humphreys, then Minister to Portugal. Humphreys had gone as far as Gibraltar on his mission when he learned that a truce had been suddenly arranged between Portugal and Algiers. This was alarming news, since it meant that the Algerines could now pass into the Atlantic from which they had been excluded by Portuguese war-vessels stationed in the strait of Gibraltar. "I have not slept since the receipt of the news of this the hellish plot," wrote Edward Church, the United States consul at Lisbon. Church was energetic in spreading the intelligence, which fortunately reached some American shipmasters in time to save them. In October, 1793, as thirteen American vessels were in the port of Lisbon afraid to venture out, Church pleaded their case so vigorously that the Portuguese government agreed to give them an armed convoy. Nevertheless the Algerines found plenty of game among American ships then at sea, for they captured ten vessels and added one hundred and five more Americans to the stock of slaves in Algiers. "They are in a distressed and naked situation," wrote Captain O'Brien, who had himself then been eight years in captivity.
Humphreys made arrangements by which they received clothing and a money allowance ranging from twelve cents a day for a seaman up to eight dollars a month for a captain. Nothing, however, could be done in the way of peace negotiations. One of Humphreys' agents reported that the Dey could not make peace even if he really wanted to do so. "He declared to me that his interest does not permit him to accept your offers, Sir, even were you to lavish millions upon him, 'because,' said he, 'if I were to make peace with everybody, what should I do with my Corsairs? What should I do with my soldiers? They would take off my head, for want of other prizes.'"
This was an honest disclosure of the situation. Humphreys wrote Jefferson that "no choice is left for the United States but to prepare a naval force for the protection of their trade." Captain O'Brien wrote, "By all means urge Congress to fit out some remarkably fast sailing cruisers, well appointed and manned." In January, 1794, accordingly, a committee of the House brought in a resolution for building four ships of 44 guns and two of 20 guns each. The debate began on February 6, and for some time was altogether one-sided, with one speaker after another opposing the creation of a navy. Madison, as was now his habit, had doubts as to the propriety of the measure. He fancied that peace "might be purchased for less money than this armament would cost." Clark of New Jersey had "an objection to the establishment of a fleet, because, when once it had been commenced, there would be no end to it." He had "a scheme which he judged would be less expensive and more effectual. This was to hire the Portuguese to cruise against the Algerines." Baldwin of Georgia thought that "bribery alone could purchase security from the Algerines." Nicholas of Virginia "feared that we were not a match for the Algerines."
Smith of Maryland and Fitzsimmons of Pennsylvania championed the resolution, and Fisher Ames made some remarks on Madison's lack of spirit that caused Madison to define his position. He proposed as a substitute for the pending measure that money should "be employed in such a manner as should be found most effectual for obtaining a peace with the Regency of Algiers; and failing of this, that the sum should be applied to the end of obtaining protection from some of the European Powers." This motion warmed up the debate. Giles of Virginia came to Madison's support in a style that was not helpful. He "considered navies altogether as very foolish things. An immense quantity of property was spread on the water for no purpose whatever, which might have been employed by land to the best purpose." The suggestion that the United States should be a hermit nation was an indiscreet exposure of the logical significance of Madison's plan, and it perhaps turned the scale in favor of employing force.
The bill came up in the House for final passage on March 10, 1794. Its opponents now sparred for time, but a motion to recommit in order to give opportunity for further consideration was defeated by 48 to 41. Giles made a final effort, by a long and elaborate address, in which he argued that the effect of fitting out a navy would be to involve the United States in war with all the European Powers. Moreover, a navy would be dangerous to American liberty. "A navy is the most expensive of all means of defense, and the tyranny of governments consists in the expensiveness of their machinery." He pointed to the results of British naval policy. "The government is not yet destroyed, but the people are oppressed, liberty is banished." The French monarchy had been ruined by its navy. He was "astonished, with these fatal examples before our eyes, that there should be gentlemen who would wish to enter upon this fashionable system of politics." In discussing the expense of maintaining a navy, he expressed his fear that it would eventually bring back the miseries of feudalism.
William Smith of South Carolina made a reply in which he defined the issue as being between defense and tribute; but Giles had the last word. He wanted to know whether it was maintained that the frigates it was proposed to build would "boldly march upon land and break the chains of the prisoners?" He begged Congress not to do what "would irritate the barbarians and furnish additional misery to the unfortunate prisoners." In this closing struggle over the bill Giles fought single-handed. When he had quite finished, the bill was passed by 50 yeas to 39 nays, a result which showed a decided gain in strength from the discussion.
The debates in the Senate have not been preserved, but the Senate was so evenly divided that it took the casting vote of the Vice-President to pass the bill, which became law March 27, 1794. In order to get it passed at all, a proviso had been tacked on that, if peace terms could be arranged, "no farther proceeding be had under this Act." In September, 1795, a treaty of peace with Algiers was finally concluded, after negotiations had been facilitated by a contingent fee of $18,000 paid to "Bacri the Jew, who has as much art in this sort of management as any man we ever knew," the American agents reported. It was a keen bargain, as Bacri had to propitiate court officials at his own risk, and had to look for both reimbursement and personal profit, too, out of the lump sum he was to receive in event of his success. It can hardly be doubted that he had the situation securely in hand before making the bargain. The money paid in Algiers for the ransom of the captives, for tribute and for presents to officials amounted to $642,500.00. But in addition the United States agreed to build a frigate for the Algerine navy and also supply naval stores, which with incidental expenses brought the total cost of the peace treaty up to $992,463.25. Moreover, the United States agreed to pay an annual tribute of 12,000 sequins,—about $27,500.
By the terms of the navy act, the United States had to stop building vessels for its own protection. Of those which had been authorized, the frigates Constitution, United States, and Constellation were under way and were eventually completed. The timber, with material that had been collected for the other vessels, was sold, except what was needed for the frigate which was to be presented to the Algerines, and which was to be built at Portsmouth, N.H. The whole affair was a melancholy business that must have occasioned Washington deep chagrin. In his address to Congress, December 7, 1796, announcing the success of the negotiations for effecting the release of the captives, he observed that "to secure respect to a neutral flag requires a naval force, organized and ready to vindicate it from insult or aggression."