During the American Revolutionary War, John André, a British Army officer, was hanged as a spy by the Continental Army.
Source
British Major John André was captured and searched by three Westchester militiamen near Tarrytown, New York, USA.