During the War of 1812, Key and British Prisoner Exchange Agent Colonel John Stuart Skinner dined aboard as the guests of Vice Admiral Alexander Cochrane, Rear Admiral George Cockburn, and Major General Robert Ross. Skinner and Key were there to negotiate the release of prisoners, one of whom was William Beanes, a resident of Upper Marlboro, Maryland, who had been arrested after jailing British troops who were taking food from local farms. Skinner, Key, and Beanes were not allowed to return to their own sloop because they had become familiar with the strength and position of the British units and their intention to launch an attack upon Baltimore, and Key was unable to do anything but watch the bombarding of the American forces at Fort McHenry during the Battle of Baltimore on the night of September 1314,1814.