Two trapped ions that are kilometers apart can be entangled by the joint detection of two photons, each coming from one of the ions, in a basis of entangled states. Such a detection is possible with linear optical elements. The use of two-photon interference allows entanglement distribution without interferometric sensitivity to the path length of the photons. The present method of creating entangled ions also opens up the possibility of a loophole-free test of Bell's inequalities.