  Lenticular galaxies are believed to form by a combination of environmental
effects and secular evolution. We study the nearby disc-dominated S0 galaxy NGC
6340 photometrically and spectroscopically to understand the mechanisms of S0
formation and evolution in groups. We use SDSS images to build colour maps and
light profile of NGC 6340 which we decompose using a three-component model
including Sersic and two exponential profiles. We also use Spitzer images to
study the morphology of regions containing warm ISM and dust. Then, we
re-process and re-analyse deep long-slit spectroscopic data for NGC 6340 and
recover its stellar and gas kinematics, distribution of age and metallicity
with the NBursts full spectral fitting. We obtain the profiles of internal
kinematics, age, and metallicity out to >2 half-light radii. The three
structural components of NGC 6340 are found to have distinct kinematical and
stellar population properties. We see a kinematical misalignment between inner
and outer regions of the galaxy. We confirm the old metal-rich centre and a
wrapped inner gaseous polar disc (r~1 kpc) having weak ongoing star formation,
counter-rotating in projection with respect to the stars. The central compact
pseudo-bulge of NGC 6340 looks very similar to compact elliptical galaxies. In
accordance with the results of numerical simulations, we conclude that
properties of NGC 6340 can be explained as the result of a major merger of
early-type and spiral galaxies which occurred about 12 Gyr ago. The
intermediate exponential structure might be a triaxial pseudo-bulge formed by a
past bar structure. The inner compact bulge could be the result of a nuclear
starburst triggered by the merger. The inner polar disc appeared recently,
1/3-1/2 Gyr ago as a result of another minor merger or cold gas accretion.
