Physicians sometimes order diagnostic tests to reduce the risk of malpractice liability. The authors develop an expected-utility model that links a rational physician's concerns about malpractice liability to increases in the use of diagnostic tests and use this model to assess the effects of defensive testing on patients' interests. To do so, they adapt the threshold approach to clinical decision making to incorporate the physician's interests, focusing on 1) the effect of the physician's expected liability risks and 2) the effect of any expected liability reduction due to diagnostic testing. Surprisingly, the mere existence of liability risks is often sufficient to widen the range of disease probabilities for which diagnostic testing is the preferred clinical strategy. If testing reduces the physician's expected liability risks, the testing range is widened further. For some disease probabilities, testing is preferred by the physician even though it is not in the patient's best interests. When tests are performed in such instances, utility is transferred from the patient to the physician and the physician's insurer. Although the defensive use of diagnostic tests improves clinical outcomes for some patients, it worsens clinical outcomes for others. Moreover, defensive testing worsens the expected outcomes of all patients whose clinical strategies are changed. Physicians should realize that defensive testing necessarily reduces the overall quality of patient care.