In the United Kingdom, medical school generally refers to a department within a university which is involved in the education of future medical practitioners. All leading British medical schools are state-funded and their core purpose is to train doctors on behalf of the National Health Service. Courses generally last four to six years: two years of pre-clinical training in an academic environment and two to three years clinical training at a teaching hospital and in community settings. Medical schools and teaching hospitals are closely integrated. The course of study is extended to six years if an intercalated degree is taken in a related subject.