Nursing education needs to prepare students for care of dying patients. The aim of this study was to describe the development of nursing students' attitudes toward caring for dying patients and their perceived preparedness to perform end-of-life care. A longitudinal study was performed with 117 nursing students at six universities in Sweden. The students completed the Frommelt Attitude Toward Care of the Dying Scale (FATCOD) questionnaire at the beginning of first and second year, and at the end of third year of education. After education, the students completed questions about how prepared they felt by to perform end-of-life care. The total FATCOD increased from 126 to 132 during education. Five weeks' theoretical palliative care education significantly predicted positive changes in attitudes toward caring for dying patients. Students with five weeks' theoretical palliative care training felt more prepared and supported by the education to care for a dying patient than students with shorter education. A minority felt prepared to take care of a dead body or meet relatives.