Objective: Knowledge of the role of hospital conditions in SARS-CoV-2 transmission should inform strategies for the prevention of nosocomial spread of this pathogen and of similarly transmitted viruses. This study aimed to identify risk factors for nosocomial acquisition of SARS-CoV-2. Methods: We ran a nested case-control study with incidence density sampling among adult patients hospitalized for >7 days (August-December 2020). Patients testing positive for SARS-CoV-2 after the 7th day of hospitalization were defined as cases and matched with controls (1:4) by date of admission, hospitalization duration until index date, and type of department. Individual and contextual characteristics were gathered, including admission characteristics and exposures during the risk period. Conditional logistic regression was used to estimate the odds ratios (ORs) with respective 95% confidence intervals (CI) separately for probable (diagnosed on day 8-13) and definitive (diagnosed after day 14) nosocomial sets. Results: We identified 65 cases (31 probable; 34 definitive) and 219 controls. No individual characteristic was related to nosocomial acquisition of SARS-CoV-2. Contextual risk factors for nosocomial acquisition were staying in a non-refurbished room (probable nosocomial: OR = 3.6, 1.18-10.87), contact with roommates with newly diagnosed SARS-CoV-2 (probable nosocomial: OR = 9.9, 2.11-46.55; definitive nosocomial: OR = 3.4, 1.09-10.30), and contact with roommates with a first positive test 21-90 days before the beginning of contact (probable nosocomial: OR = 10.7, 1.97-57.7). Conclusions: Hospital conditions and contact with recently infected patients modulated nosocomial SARS-CoV-2 transmission. These results alert us to the importance of the physical context and of agile screening procedures to shorten contact with patients with recent infection.