Background: We have observed that many black and Hispanic patients receiving palliative care at a major urban teaching hospital are unable to obtain prescribed opioids from their neighborhood pharmacies. In this study, we investigated the availability of commonly prescribed opioids in New York City pharmacies. Methods: We surveyed a randomly selected sample of 30 percent of New York City pharmacies to obtain information about their stock of opioids. For each pharmacy, U.S. Census estimates for 1997 were used to determine the racial and ethnic composition of the neighborhood (defined as the area within a 0.4-km [0.25-mile] radius of the pharmacy) and the proportion of residents who were more than 65 years old. Data on robberies, burglaries, and arrests involving illicit drugs in 1997 were obtained for the precinct in which each pharmacy was located. We used a generalized linear model to examine the relation between the racial or ethnic composition of neighborhoods and the opioid supplies of pharmacies, while controlling for the proportion of elderly persons at the census-block level and for crime rates at the precinct level. Results: Pharmacists representing 347 of 431 eligible pharmacies (81 percent) responded to the survey. A total of 176 pharmacies (51 percent) did not have sufficient supplies of opioids to treat patients with severe pain. Only 25 percent of pharmacies in predominantly nonwhite neighborhoods (those in which less than 40 percent of residents were white) had opioid supplies that were sufficient to treat patients in severe pain, as compared with 72 percent of pharmacies in predominantly white neighborhoods (those in which at least 80 percent of residents were white) (P<0.001). Conclusions: Pharmacies in predominantly nonwhite neighborhoods of New York City do not stock sufficient medications to treat patients with severe pain adequately. (C) 2000, Massachusetts Medical Society.