  This article studies the decoherence induced on a system of two qubits by
local interactions with a spin chain with nontrivial internal dynamics
(governed by an XY Hamiltonian). Special attention is payed to the transition
between two limits: one in which both qubits interact with the same site of the
chain and another one where they interact with distant sites. The two cases
exhibit different behaviours in the weak and strong coupling regimes: when the
coupling is weak it is found that decoherence tends to decrease with distance,
while for strong coupling the result is the opposite. Also, in the weak
coupling case, the long distance limit is rapidly reached, while for strong
coupling there is clear evidence of an expected effect: environment-induced
interactions between the qubits of the system. A consequence of this is the
appearance of quasiperiodic events that can be interpreted as ``sudden deaths''
and ``sudden revivals'' of the entanglement between the qubits, with a time
scale related to the distance between them.
