The authors studied court-ordered inpatient evaluations of competency to stand trial at two Massachusetts state hospitals for the period from 1972 to 1987, with particular attention to the effects of a 1978 federal court consent decree that created an extensive system of community-based services in the catchment area of one of the hospitals. The authors found that the broad array of community services developed under the consent decree did not reduce commitments to the state hospital for evaluation of competency to stand trial at the same rate as it reduced civil commitments, with the result that the composition of the patient population changed to include a significantly larger proportion of patients referred by the criminal justice system. This proportion was as high as 17.8 percent in 1985. These patients used a disproportionate share of the hospital's resources, staying in the hospital for a median of 28 days, compared with 12 days for all other patients.