Depression, anxiety, worry, perceived stress and loneliness, measured at the onset of the pandemic and prior to contracting COVID-19, were associated with a 45% increased risk of developing long-term COVID. Stress was more strongly associated with long-term COVID than physical health risk factors such as obesity, asthma and high blood pressure. The increased risk associated with stress was not explained by healthy behaviors such as smoking or physical health problems such as asthma.