In accordance with the present invention, there is provided a novel class of heterocyclic compounds. Compounds of the invention contain a substituted, unsaturated five, six or seven membered heterocyclic ring that includes at least one nitrogen atom and at least one carbon atom. The ring additionally includes three, four or five atoms independently selected from carbon, nitrogen, sulfur and oxygen atoms. The heterocyclic ring has at least one substituent located at a ring position adjacent to a ring nitrogen atom. This mandatory substituent of the ring includes a moiety (B), linked to the heterocyclic ring via a carbon-carbon double bond, a carbon-carbon triple bond or an azo group. The mandatory substituent is positioned adjacent to the ring nitrogen atom. Invention compounds are capable of a wide variety of uses. For example heterocyclic compounds can act to modulate physiological processes by functioning as agonists and antagonists of receptors in the nervous system. Invention compounds may also act as insecticides, and as fungicides. Pharmaceutical compositions containing invention compounds also have wide utility.