At the University of Helsinki, pain-related topics are taught throughout medical studies but without a formal pain curriculum. The purpose of this study was to assess medical students' attitudes towards pain. A questionnaire using a 6-point Likert scale was constructed to measure pain-related attitudes and beliefs described in previous studies. After a pilot study, the questionnaire was developed to assess attitudes towards elderly patients' pain, prescription of opioids, assessment of pain and anxiety concerning chronic pain and its treatment. An electronic questionnaire with seven demographic and 28 pain-related items was sent via e-mail to 680 medical students at the University of Helsinki, Finland. Three reminders were sent with a new letter of encouragement. The students had 3 weeks to answer the questionnaire. The questionnaire was returned by 63.4% of the students (N=430). There were statistically significant differences between the students in different study years showing increasing empathy towards elderly patients' pain (p<0.001), willingness to prescribe opioids (p<0.001) and anxiety about meeting patients suffering from chronic pain (p<0.01). Final year students felt significantly more often anxious about seeing a chronic pain patient (p<0.05) compared with the first year students. Female students were more anxious about seeing a patient suffering from chronic pain (p<0.05) and they were less confident of their ability to treat chronic pain patients in primary care (p<0.001) than the male students. The general attitudes of students mature as hoped for during medical studies. Attitudes towards treating the pain of cancer patients and elderly patients are positive. Attention should be paid to helping students to cope with their emotions and to reducing their anxiety about meeting patients with chronic pain.