BackgroundOutbreaks of severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) infection have occurred in long-term care facilities (LTCFs) worldwide, but the reasons why some facilities are particularly vulnerable to outbreaks are poorly understood. We aimed to identify factors associated with SARS-CoV-2 infection and outbreaks among staff and residents in LTCFs.MethodsWe did a national cross-sectional survey of all LTCFs providing dementia care or care to adults aged 65 years or older in England between May 26 and June 19, 2020. The survey collected data from managers of eligible LTCFs on LTCF characteristics, staffing factors, the use of disease control measures, and the number of confirmed cases of infection among staff and residents in each LTCF. Survey responses were linked to individual-level SARS-CoV-2 RT-PCR test results obtained through the national testing programme in England between April 30 and June 13, 2020. The primary outcome was the weighted period prevalence of confirmed SARS-CoV-2 infections in residents and staff reported via the survey. Multivariable logistic regression models were fitted to identify factors associated with infection in staff and residents, an outbreak (defined as at least one case of SARS-CoV-2 infection in a resident or staff member), and a large outbreak (defined as LTCFs with more than a third of the total number of residents and staff combined testing positive, or with >20 residents and staff combined testing positive) using data from the survey and from the linked survey–test dataset.Findings9081 eligible wLTCFs were identified, of which 5126 (56·4%) participated in the survey, providing data on 160 033 residents and 248 594 staff members. The weighted period prevalence of infection was 10·5% (95% CI 9·9–11·1) in residents and 3·8% (3·4–4·2) in staff members. 2724 (53·1%) LTCFs reported outbreaks, and 469 (9·1%) LTCFs reported large outbreaks. The odds of SARS-CoV-2 infection in residents (adjusted odds ratio [aOR] 0·80 [95% CI 0·75–0·86], p<0·0001) and staff (0·70 [0·65–0·77], p<0·0001), and of large outbreaks (0·59 [0·38–0·93], p=0·024) were significantly lower in LTCFs that paid staff statutory sick pay compared with those that did not. Each one unit increase in the staff-to-bed ratio was associated with a reduced odds of infection in residents (0·82 [0·78–0·87], p<0·0001) and staff (0·63 [0·59–0·68], p<0·0001. The odds of infection in residents (1·30 [1·23–1·37], p<0·0001) and staff (1·20 [1·13–1·29], p<0·0001), and of outbreaks (2·56 [1·94–3·49], p<0·0001) were significantly higher in LTCFs in which staff often or always cared for both infected or uninfected residents compared with those that cohorted staff with either infected or uninfected residents. Significantly increased odds of infection in residents (1·01 [1·01–1·01], p<0·0001) and staff (1·00 [1·00–1·01], p=0·0005), and of outbreaks (1·08 [1·05–1·10], p<0·0001) were associated with each one unit increase in the number of new admissions to the LTCF relative to baseline (March 1, 2020). The odds of infection in residents (1·19 [1·12–1·26], p<0·0001) and staff (1·19 [1·10–1·29], p<0·0001), and of large outbreaks (1·65 [1·07–2·54], p=0·024) were significantly higher in LTCFs that were for profit versus those that were not for profit. Frequent employment of agency nurses or carers was associated with a significantly increased odds of infection in residents (aOR 1·65 [1·56–1·74], p<0·0001) and staff (1·85 [1·72–1·98], p<0·0001), and of outbreaks (2·33 [1·72–3·16], p<0·0001) and large outbreaks (2·42 [1·67–3·51], p<0·0001) compared with no employment of agency nurses or carers. Compared with LTCFs that did not report difficulties in isolating residents, those that did had significantly higher odds of infection in residents (1·33 [1·28–1·38], p<0·0001) and staff (1·48 [1·41–1·56], p<0·0001), and of outbreaks (1·84 [1·48–2·30], p<0·0001) and large outbreaks (1·62 [1·24–2·11], p=0·0004).InterpretationHalf of LTCFs had no cases of SARS-CoV-2 infection in the first wave of the pandemic. Reduced transmission from staff is associated with adequate sick pay, minimal use of agency staff, an increased staff-to-bed ratio, and staff cohorting with either infected or uninfected residents. Increased transmission from residents is associated with an increased number of new admissions to the facility and poor compliance with isolation procedures.FundingUK Government Department of Health and Social Care.