Cutaneous malignant melanoma has an increasing importance all over the world. However very few epidemiological studies have been published from Spain, and Spanish people have not become aware of the problem. This study was designed to examine sun exposure patterns and other related Items among 116 consecutive patients with melanoma and 235 controls. Each subject answered a questionnaire covering the place of residence, sun exposure details and other risk factors, and underwent a skin examination. Continuous sun exposure due to residence or occupation was associated with an odds ratio (OR) of 2.0 (95% confidence interval [CI] = 1.2–3.3). People who lived in the city but spent 50% of their time in rural areas for holidays had an OR of 2.2 (95% CI = 1.3 3.8) when compared with those living in urban and rural areas. The OR for people who sunbathed more than 30 times a year was 1.8 (95% CI = 1.2–2.8), and outdoor leisure time was also associated with melanoma appearance when exposure was greater than 60 units in the last 2 years, with an OR of 3.0 (95% CI = 1.6–5.5); 1 unit is equivalent to total body sun exposure for at least 2 h. These OR estimates were adjusted for age, skin type and the number of naevi. Construction workers (OR = 1.6; 95% CI = 0.5 5.6) had increased risk after adjustment for skin type, age and freckle count (OR = 4.3; 95% CI = 1.8–9.9) or mole count (OR = 2.8; 95% CI = 1.4–5.8). Working as a farmer was a protective factor after adjustment (OR = 0.5; 95% CI = 0.3–0.8). The use of sunscreens was a protective factor against melanoma (OR = 2.6; 95% CI = 1.6–3.6 for non-users). Campaigns should focus on advising people to avoid sun exposure in sunny places and to use sunscreens every time they are exposed to the sun.