We consider the problem of determining whether the union of two infinite matroids is a matroid. We introduce a superclass of the finitary matroids, the nearly finitary matroids, and prove that the union of two nearly finitary matroids is a nearly finitary matroid. On the other hand, we prove that the union of two arbitrary infinite matroids is not necessarily a matroid. Indeed, we show (under a weak additional assumption) that the nearly finitary matroids are essentially the largest class of matroids for which one can have a union theorem. We then extend the base packing theorem for finite matroids to finite families of co-finitary matroids. This, in turn, yields a matroidal proof for the tree-packing results for infinite graphs due to Diestel and Tutte.