Our Galaxy is thought to have an active evolutionary history, dominated over the past ten billion years or so by star formation, the accretion of cold gas and, in particular, the merging of clumps of baryonic and dark matter. The stellar halo—the faint, roughly spherical component of the Galaxy—reveals rich ‘fossil’ evidence of these interactions, in the form of stellar streams, substructures and chemically distinct stellar components. The effects of interactions with dwarf galaxies on the content and morphology of the Galactic disk are still being explored. Recent studies have identified kinematically distinct stellar substructures and moving groups of stars in our Galaxy, which may have extragalactic origins. There is also mounting evidence that stellar overdensities (regions with greater-than-average stellar density) at the interface between the outer disk and the halo could have been caused by the interaction of a dwarf galaxy with the disk. Here we report a spectroscopic analysis of 14 stars from two stellar overdensities, each lying about five kiloparsecs above or below the Galactic plane—locations suggestive of an association with the stellar halo. We find that the chemical compositions of these two groups of stars are almost identical, both within and between these overdensities, and closely match the abundance patterns of stars in the Galactic disk. We conclude that these stars came from the disk, and that the overdensities that they are part of were created by tidal interactions of the disk with passing or merging dwarf galaxies.