BACKGROUND: Drug prescribing to the elderly is extensive and often inappropriate. Furthermore, the number of drugs used is the most important risk factor for adverse drug reactions. Despite this, drug prescribing in the elderly in Sweden is high and increasing. In 2003 the Swedish National Board of Health and Welfare launched a set of indicators to evaluate the quality of drug therapy in the elderly. Use of this tool in combination with the Swedish computerized national register covering all persons receiving multi-dose drug dispensing (drugs dispensed in one dose unit bag for each dose occasion) would enable detection of inappropriate drug prescribing and could help reduce the risk of drug-related problems among the elderly. OBJECTIVES: To assess the extent and quality of drug prescribing in younger and older elderly residents receiving multi-dose drug dispensing in ordinary nursing homes (NHs) and special care units for dementia (NHDs), and to evaluate the relationship between the quality of prescribing and the number of prescribers per resident, in a Swedish county. METHODS: The computerized national pharmacy drug register provided the database and a cross-sectional design was used. Selected drug-specific quality indicators proposed by the Swedish National Board of Health and Welfare in 2003 were used to assess the quality of drug prescribing. RESULTS: This study included 3705 residents. Their mean age was 85 years and 72% were women. The mean number of prescribed drugs was 10.3 per resident. The proportion of residents with prescriptions for psychotropic drugs was 80% in NHs and 85% in NHDs. The prevalence of each drug-specific quality indicator was as follows: long-acting benzodiazepines 16.4% (NHs) versus 11.7% (NHDs), anticholinergic drugs 20.7% versus 18.5%, drug duplication 14.6% versus 13.6%, three or more psychotropic drugs 25.6% versus 35.3%, class C interactions (drug combinations that may require dose adjustment) 41.9% versus 38.7% and class D interactions (drug combinations that should be avoided) 8.1% versus 5.6%. Younger elderly residents (age 65-79 years) had a lower quality of drug prescribing. An increasing number of prescribers per resident was associated with a lower quality of drug therapy. CONCLUSIONS: We found a lower quality of drug prescribing, e.g. anticholinergic drugs prescribed to approximately 20% of residents of NHs and NHDs, and a higher rate of psychotropic drug use (>/=80%) compared with previous studies in NHs. Our results also demonstrated a negative correlation between quality of prescribing and number of prescribers per resident.