Put the vinegar, water, sugar, peppercorns, allspice, star anise, juniper berries and tomato purée into a saucepan.
Bring briefly to the boil, stirring until the sugar has dissolved.
Remove from the heat and allow the mixture to cool completely.
Stir in the sherry.
Add the herring pieces and mix gently to coat.
Chill for several hours before serving, preferably overnight.
Notes
If possible, use old-fashioned herrings (gammeldags modnede sild in Danish).You might also want to read about the provenance of this recipe described below the one for Curried Herrings.