We report strong near-infrared absorption peaks in epitaxial films of GaAs and AlAs containing approximately 0.5–5% of the semimetal ErAs. The energy of the resonant absorption peak can be changed from 0.62to1.0eV (2.2–1.4μm) by variation of the ErAs volume fraction and the substrate temperature. We interpret the infrared absorption in terms of transitions across an energy gap caused by a confinement-induced semimetal-semiconductor transition. An effective mass model relates the changes in nanoparticle diameter observed in transmission electron microscopy to the energy gap.