During the American Revolutionary War, John André, a British Army officer, was hanged as a spy by the Continental Army.
Source