For some months Barney could not join his ship, being bound by his parole, but at last an accident relieved him of it. It happened that Lieutenant Moriarty, of the English frigate "Solebay," with a boat's-crew, had incautiously gone ashore for water somewhere in the Chesapeake, and had been seized and taken prisoner by a party of Virginians. Captain Elphinstone now made an agreement with Gov. Patrick Henry, of Virginia, to exchange the two lieutenants; and so Barney was released from his parole in time to bear his part in the actions in the Delaware River during the weeks that followed Sir William Howe's occupation of the city. How the "Doria" and the other vessels were destroyed after the surrender of the forts has been already told; and Barney, being now without a ship, was ordered to march with a detachment of his men to Baltimore, and there to join the new frigate "Virginia."
It was just at New Year's, in 1778, that Barney arrived in Baltimore; and as the frigate of which he was to be the first lieutenant was not yet ready for sea, he took command of a pilot-boat to cruise about the bay and watch the movements of the enemy, who had then several ships in the Chesapeake. One night, as he was returning from a reconnoissance, he found a merchant-sloop from Baltimore on her way down the bay, and hailed her, telling her what dangers she would meet below. To his no small surprise he was answered by a volley of musketry. He tacked in order that he might the better return this unlooked-for fire, and presently discovered on the off side of the sloop a ship's barge lashed alongside. It was now clear why his seeming friend had fired on him. The enemy had cut out the sloop, and they were using her as a decoy to capture Barney. But he served them the same turn that he had served the "Racehorse;" for after a short and sharp struggle he captured them and took them to the city. The barge belonged to His Majesty's ship "Otter;" and Barney, mindful of the treatment he had received on board the "Perseus," took the best of care of his prisoners,--above all of Gray, the officer in charge, who had been wounded, and sent a flag-of-truce boat to the "Otter," to bring them what they needed.