Drug-resistant tuberculosis can be transmitted (primary) or develop during the course of treatment (secondary). We investigated risk factors for each type of resistance. We compared all patients in England and Wales with isoniazid- and multidrug-resistant tuberculosis in two time-periods (1993-1994 and 1998-2000) with patients with fully sensitive tuberculosis, examining separately patients without and with previous tuberculosis (a proxy for primary and secondary drug-resistant tuberculosis). Patients with previous tuberculosis smear positivity and arrival in the United Kingdom <5 years were strongly associated with multidrug resistance and isoniazid resistance. In patients with no previous tuberculosis HIV infection, residence in London and foreign birth were risk factors for multidrug resistance, and non-white ethnicity, residence in London and HIV infection for isoniazid resistance. Risk factors for each type of resistance differ. Elevated risks associated with London residence, HIV positivity, and ethnicity were mainly seen in those without previous tuberculosis (presumed transmission).