N-body + smoothed particle hydrodynamics (SPH) simulations are used to stud
y the evolution of dwarf irregular galaxies (dIrr's) entering the dark matt
er halo of the Milky Way or M31 on plunging orbits. We propose a new dynami
cal mechanism driving the evolution of gas-rich, rotationally supported dIr
r's, mostly found at the outskirts of the Local Group (LG), into gas-free,
pressure-supported dwarf spheroidals (dSph's) or dwarf ellipticals (dE's),
observed to cluster around the two giant spirals. The initial model galaxie
s are exponential disks embedded in massive dark matter halos and reproduce
nearby dIrr's. Repeated tidal shocks at the pericenters of their orbits pa
rtially strip their halos and disks and trigger dynamical instabilities tha
t dramatically reshape their stellar components. After only 2-3 orbits low
surface brightness dIrr's are transformed into dSp'hs while high surface br
ightness dIrr's evolve into dE's. This evolutionary mechanism naturally lea
ds to the morphology-density relation observed for LG dwarfs. Dwarfs surrou
nded by very dense dark matter halos, such as the dIrr GR8, are turned into
Draco or Ursa Minor, the faintest and most dark matter dominated among LG
dSph's. If disks include a gaseous component, this is both tidally stripped
and consumed in periodic bursts of star formation. The resulting star form
ation histories are in good qualitative agreement with those derived using
Hubble Space Telescope (HST) color-magnitude diagrams for local dSph's.