The rotary capacitor with spacers between the stack stator and rotor electrodes which protrude radially from the fastening axis is produced by metal-plating the spacers, the specific resistance of the plating being higher than that of the highly conductive spacer metal core. Each electrode stack (11, 12) is then firmly pressed together and the contact surfaces between the spacers are heated until the metal plating is melted on the contact surfaces. The melted metal provides a firm connection between the electrodes and the spacers. After cooling down the rotor core (12) is secured on the rotor shaft (7), while the stator core (11) is secured to a stationary stator rod. Preferably the heating is provided by a resistance welding machine.