This study examines the impact of the exotic nitrogen-fixing legume Melilotus officinalis (L.) Lam. on native and exotic species cover in two Great Plains ecosystems in Badlands National Park, South Dakota. Melilotus is still widely planted and its effects on native ecosystems are not well studied. Melilotus could have direct effects on native plants, such as through competition or facilitation. Alternatively, Melilotus may have indirect effects on natives, e.g., by favoring exotic species which in turn have a negative effect on native species. This study examined these interactions across a 4-year period in two contrasting vegetation types: Badlands sparse vegetation and western wheatgrass (Pascopyrum smithii) mixed-grass prairie. Structural equation models were used to analyze the pathways through which Melilotus, native species, and other exotic species interact over a series of 2-year time steps. Melilotus can affect native and exotic species both in the current year and in the years after its death (a lag effect). A lag effect is possible because the death of a Melilotus plant can leave an open, potentially nitrogen-enriched site on the landscape. The results showed that the relationship between Melilotus and native and exotic species varied depending on the habitat and the year. In Badlands sparse vegetation, there was a consistent, strong, and positive relationship between Melilotus cover and native and exotic species cover suggesting that Melilotus is acting as a nurse plant and facilitating the growth of other species. In contrast, in western wheatgrass prairie, Melilotus was acting as a weak competitor and had no consistent effect on other species. In both habitats, there was little evidence for a direct lag effect of Melilotus on other species. Together, these results suggest both facilitative and competitive roles for Melilotus, depending on the vegetation type it invades.