Hallmarks of quantum mechanics include superposition and entanglement. In the context of large complex systems, these features should lead to situations as envisaged in the 'Schrödinger's cat'1 thought experiment (where the cat exists in a superposition of alive and dead states entangled with a radioactive nucleus). Such situations are not observed in nature. This may be simply due to our inability to sufficiently isolate the system of interest from the surrounding environment2, 3—a technical limitation. Another possibility is some as-yet-undiscovered mechanism that prevents the formation of macroscopic entangled states4. Such a limitation might depend on the number of elementary constituents in the system5 or on the types of degrees of freedom that are entangled. Tests of the latter possibility have been made with photons, atoms and condensed matter devices6, 7. One system ubiquitous to nature where entanglement has not been previously demonstrated consists of distinct mechanical oscillators. Here we demonstrate deterministic entanglement of separated mechanical oscillators, consisting of the vibrational states of two pairs of atomic ions held in different locations. We also demonstrate entanglement of the internal states of an atomic ion with a distant mechanical oscillator. These results show quantum entanglement in a degree of freedom that pervades the classical world. Such experiments may lead to the generation of entangled states of larger-scale mechanical oscillators8, 9, 10, and offer possibilities for testing non-locality with mesoscopic systems11. In addition, the control developed here is an important ingredient for scaling-up quantum information processing with trapped atomic ions12, 13, 14.