Populations facing novel environments can persist by adapting. In nature, the ability to adapt and persist will depend on interactions between coexisting individuals. Here we use an adaptive dynamic model to assess how the potential for evolutionary rescue is affected by intra- and interspecific competition. Intraspecific competition (negative density-dependence) lowers abundance, which decreases the supply rate of beneficial mutations, hindering evolutionary rescue. On the other hand, interspecific competition can aid evolutionary rescue when it speeds adaptation by increasing the strength of selection. Our results clarify this point and give an additional requirement: competition must increase selection pressure enough to overcome the negative effect of reduced abundance. We therefore expect evolutionary rescue to be most likely in communities which facilitate rapid niche displacement. Our model, which aligns to previous quantitative and population genetic models in the absence of competition, provides a first analysis of when competitors should help or hinder evolutionary rescue.