While serving in the Continental Navy, Joshua Barney had been captured by the British and was shipped to England in a 3-foot- high box, receiving minimal food and water during the 53-day voyage. With the help of a friendly guard, he escaped from prison and returned to America.
Undaunted by his ordeal as a prisoner of war, in March of 1782 Barney was given command of an armed merchantman in the Pennsylvania State Navy named the Hyder-Ally. Fourteen days later, he was under way, escorting a convoy of seven merchant ships down the Delaware River. When the convoy encountered a group of British ships cruising off the mouth of Delaware Bay, Barney ordered his merchant flock to flee and positioned the Hyder-Ally to serve as a rear guard. Several of the British vessels chased after the convoy, but one, a 250-ton sloop of war, came after the Hyder-Ally. At the time, Barney had no way of knowing that the enemy ship was HMS General Monk, formerly the General Washington, which had been captured by the British earlier in the war.
It was not a fair match-up. The 100-ton Hyder-Ally carried only 16 six-pounder cannon to the 250-ton General Monk's 20 nine-pounders. The British captain—Josias Rogers—and his crew were experienced, having previously captured 60 vessels, while the Americans were largely a band of neophytes on their first cruise.
As the two ships drew near to one another, Barney kept his gunports closed and his guncrews hidden hoping to convince the British captain that he intended only to present a moving target to screen his fleeing convoy and buy them time to escape. Rogers took the bait and, heading straight for the Hyder-Ally, was bow on to the American in a classic "crossing the T" situation when Barney opened his gunports and fired a broadside of round shot, grape, and canister. The barrage found its mark, damaging the main mast and shredding many of the General Monk's sails. The two ships began exchanging broadsides, a tactic that put the Hyder-Ally at a disadvantage because of the enemy's heavier firepower, so Barney decided that boarding the enemy was his best bet. Closing the distance, he quietly told his helmsman to "follow my next order by the rule of the contrary." When the ships were very close, he yelled to the helmsman, "Hard a-port your helm." As Barney hoped, Rogers heard the order and immediately ordered the General Monk to come "hard a-port" as well, so that the two vessels would pass close aboard but not make contact. To his astonishment, the Hyder-Ally came right instead, and in seconds the two ships collided and were locked in a deadly embrace. Savage hand-to-hand fighting ensued. As Barney climbed atop the binnacle box to direct the action, a musket ball passed through his hat, leaving a minor scalp wound in its wake, and another passed through the tail of his coat, evoking a less-than-polite curse from the young captain. The binnacle box was soon shot out from under him, but Barney was not injured.
After 26 minutes, the brawl was over, with the more powerful British ship in American hands. The victor had suffered 4 killed and 11 wounded, while the vanquished had lost 20 killed and 33 wounded. In his 1845 The History of the Navy, James Fenimore Cooper described the victory as "one of the most brilliant . . . under the American flag."