  Although S0 galaxies are usually considered "red and dead", they often
demonstrate star formation organized into ring structures. We aim to clarify
the nature of this phenomenon and how it differs from star formation in spiral
galaxies. We investigated the nearby, moderate-luminosity S0 galaxy NGC 254
using long-slit spectroscopy taken with the South African Large Telescope and
publicly available imaging data. Applying a full spectral fitting, we analyzed
gaseous and stellar kinematics as well as ionized gas excitation and
metallicity and stellar population properties resolved by radius. An advanced
approach of simultaneously fitting spectra and photometric data allowed us to
quantify the fraction of hidden counter-rotating stars in this galaxy. We find
that the ionized gas is counter-rotating with respect to the stars throughout
NGC 254 disk, indicating an external origin of the gas. We argue the gas-rich
galaxy merger from retrograde orbit as a main source of counter-rotating
material. The star formation fed by this counter-rotating gas occurs within two
rings: an outer ring at R=55 - 70 arcsec and an inner ring at R=18 arcsec. The
star formation rate is weak, 0.02 solar mass per year in total, and the gas
metallicity is slightly subsolar. We estimated that the accretion of the gas
occurred about 1 Gyr ago, and about 1% of all stars have formed in situ from
counter-rotating gas.
