Anodic cyclization reactions: capitalizing on an intramolecular electron transfer to trigger the synthesis of a key tetrahydropyran building block.