OBJECTIVEThe COVID-19 pandemic has forced many countries into lockdown and has led to the postponement of nonurgent neurosurgical procedures. Although stress has been investigated during this pandemic, there are no reports on anxiety in neurosurgical patients undergoing nonurgent surgical procedures.METHODSNeurosurgical patients admitted to hospitals in eastern Lombardy for nonurgent surgery after the lockdown prospectively completed a pre- and postoperative structured questionnaire. Recorded data included demographics, pathology, time on surgical waiting list, anxiety related to COVID-19, primary pathology and surgery, safety perception during hospital admission before and after surgery, and surgical outcomes. Anxiety was measured with the State-Trait Anxiety Inventory. Descriptive statistics were computed on the different variables and data were stratified according to pathology (oncological vs nononcological). Three different models were used to investigate which variables had the greatest impact on anxiety, oncological patients, and safety perception, respectively. Because the variables (Xs) were of a different nature (qualitative and quantitative), mostly asymmetrical, and related to outcome (Y) by nonlinear relationships, a machine learning approach composed of three steps (1, random forest growing; 2, relative variable importance measure; and 3, partial dependence plots) was chosen.RESULTSOne hundred twenty-three patients from 10 different hospitals were included in the study. None of the patients developed COVID-19 after surgery. State and trait anxiety were reported by 30.3% and 18.9% of patients, respectively. Higher values of state anxiety were documented in oncological compared to nononcological patients (46.7% vs 25%; p = 0.055). Anxiety was strongly associated with worry about primary pathology, surgery, disease worsening, and with stress during waiting time, as expected. Worry about positivity to SARS-CoV-2, however, was the strongest factor associated with anxiety, even though none of the patients were infected. Neuro-oncological disease was associated with state anxiety and with worry about surgery and COVID-19. Increased bed distance and availability of hand sanitizer were associated with a feeling of safety.CONCLUSIONSThese data underline the importance of psychological support, especially for neuro-oncological patients, during a pandemic.