Based on terror management theory, previous research has shown that terrorism threat increases prejudice against Muslims and is mediated by death-related thoughts. Because this effect was found on a correlational level, it remains unclear whether terrorism threat increases prejudice against Muslims because of enhanced death-related thoughts or the opposite: terrorism threat increases death-related thoughts because of stronger prejudice against Muslims. To disentangle this shortcoming, we varied death-related thoughts by systematically manipulating the belief in literal immortality. Using two studies, we found that participants exposed to terrorism pictures (vs. controls) had increased prejudice against both Muslims (Study 1) and immigrants (Study 2) when they were led to believe that literal immortality does not exist but not when they were led to believe that it does exist. Mediation analysis indicated that this effect was mediated by death-related thoughts. This provides further evidence that terrorism threat increases prejudice because of death-related thoughts.