We show that an effective two-qubit gate can be obtained from the free evolution of three spins in a chain with nearest neighbor XY coupling, without local manipulations. This gate acts on the two remote spins and leaves the mediating spin unchanged. It can be used to perfectly transfer an arbitrary quantum state from the first spin to the last spin or to simultaneously communicate one classical bit in each direction. One ebit can be generated in half of the time for state transfer. For longer spin chains, we present methods to create or transfer entanglement between the two end spins in half of the time required for quantum state transfer, given tunable coupling strength and local magnetic field. We also examine imperfect state transfer through a homogeneous XY chain.