The merchants were astounded at the attempt of this boy of sixteen to make resistance, and upon their presenting a complaint to the governor, the latter threw Barney into prison. Making his escape by a stratagem, young Barney went at once to Milan and laid his case before the British minister, with such effect that in three days he had returned to Nice, the governor had apologized, his bond had been paid, and his ship discharged.

After a short stay Barney set out on his voyage home. As he was coming up the Chesapeake, he learned for the first time, from an English sloop-of-war that boarded him, of the stirring events that had occurred,—that battles had been fought at Lexington and Bunker Hill, and that Washington was besieging Boston, and the war for independence was begun. As soon as he landed, he made the offer of his services to the Government.

At first Barney served as a volunteer in small vessels; but he soon became a lieutenant, and he was ordered late in the summer of 1776 to the "Andrew Doria," now under the command of Captain Robinson. In this ship he made a cruise to the West Indies. While here, the "Doria" put in at the Dutch island of St. Eustatius to get some ammunition that was stored there for the Continental Congress, and upon arrival she fired a salute to the governor's flag. The governor, without much thought perhaps, returned the salute. This was the first time that the flag of the new American State had been recognized by any foreign power, and the Americans were much rejoiced that it should come about. But the British, who still felt that the Colonies were a part of Britain, and who knew that Holland was bound so to regard them, were incensed at the governor's act, and demanded his recall. The Dutchmen, who did not dare refuse, ordered him home; and the poor governor lost his post in consequence of his unthinking courtesy.

Soon after this the "Doria," now on her way home, met an enemy's sloop-of-war, the "Racehorse," which had been sent by Admiral Parker to lie in wait for her off Porto Rico. But the admiral did not count upon the bravery of the Americans, or he would have sent a larger ship; for the "Racehorse," after a hot engagement for two hours, was herself forced to surrender.

A few days later the "Doria" captured an English snow,—an armed merchant-vessel of peculiar rig,—and Barney was detached to take her home. As had happened before with the "Doria's" prizes when Biddle was in command, the brig's crew was too small to man them, and Barney made up the needed number from the prisoners. On the way north he had heavy weather, for it was now December,—a month in which no seaman likes to pass Cape Hatteras,—and day after day the vessel encountered a succession of furious gales and heavy seas. Keeping well out to the eastward until he had fetched a point from which he could reach the Chesapeake, Barney now headed for the land, and at last found himself, on Christmas night, in a driving easterly storm, close on the breakers of the Jersey coast. To keep his vessel away from the lee shore and its certain perils, the young prize-master, as his only course, resolved to ride out the gale and let go his only anchor. So the night fell upon him and his men,—a fearful night, what with the roaring tempest, and the sea rolling mountains high, while every wave broke over the bows of the ship. It seemed each instant, from the violence of the sea, that the small cable must part, and with it she would lose her only hope. The men, yielding themselves to blank despair, were sinking into lethargy. It was then that Barney, though he had little cause to hope himself, talked to them with cheering words, trying to rouse them from their stupor. He called to mind the battles they had fought, and how they had been ready to stand up bravely before the enemy and face death in another form.

"I am not much of a chaplain, my good lads," he said, "but this I know, that the same Power that protected you then can protect you now; and if we are all to go to Davy Jones's locker, we might as well go with a bold face as a sheepish one."

Barney's good example shamed the men to greater courage; but the night wore on and the day broke, and still the fury of the storm kept up. The crew were in the tops, and Barney with them. Soon a cry was heard of "Sail ho!" and every eye was turned toward a small sloop, which appeared in sight driven before the gale, yet trying to make an offing. Anxiously the men watched the frail boat, one moment rising on the wave till they could see her keel, and the next plunging down till she was lost to view. Each time it seemed as if she could not rise again; but each time she shot up on the foaming crest, seemingly steadying herself an instant before the next downward plunge. Suddenly there was heard a long, shrill shriek of terror piercing through the din and crash of breakers, and the sloop was swallowed up in the seething waters.

After this sight no words of Barney's could rouse his men from their terrors. But fortunately toward the middle of the afternoon the wind abated and the sea gradually went down. Barney lost no time in getting his crew down from aloft as soon as it was safe, and they were only too glad to come.

"Up with the anchor! Man the capstan! Cheerily, my lads!" rang out from Barney; and the men went to their duties with a will, and getting underway, headed for the harbor of Chincoteague, near by, where they found a temporary shelter.

After resting here for a few days Barney started for the Chesapeake. On the second day out he was discovered by the "Perseus," one of the enemy's blockading vessels, which immediately started in pursuit. Barney would have got off, as he had the faster ship; but the prisoners in his crew, who had been planning mutiny, and were only waiting till they sighted an English ship-of-war, refused to go to their stations. Barney singled out the ringleader and ordered him to his duty, and as the man did not stir he shot him then and there, though without giving him a mortal wound. This put an end to the mutiny; but through the delay the "Perseus" had been enabled to overtake the prize-vessel, and so she was recaptured. The wounded mutineer told his story to Captain Elphinstone, the commander of the "Perseus," thinking that he would at once have Barney put in irons; but the captain set his complaint at nought, and said that if he had been in Barney's place he would have done the same.