Patients with AIDS and related illnesses are entering state mental hospitals in increasing numbers. State hospitals in New York City generally did not plan for patients infected with human immunodeficiency virus (HIV) until the first patient appeared; however, over the past five years, approaches to managing these patients have evolved in the areas of admission policies, in-hospital care, and discharge planning. Strenthening infection control procedures through the adoption of universal precautions was the most straightforward aspect of inhospital care. Testing for HIV and confidentiality of the test results proved most controversial. Clinical leaders urged that testing be done only with pre- and posttest counseling and only if the patient has symptoms of HIV infection, has requested the test, or has exposed others to infection. The authors describe these and other policies addressing medical care, restraint and seclusion, sexual behavior, and education and training.