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.