Homosexuality is now accepted as a normal variant of human sexuality, but homophobia among healthcare professionals is well documented. Establishment of trustful doctor-patient relationships is impossible in the presence of homophobia. We were interested to examine the extent of homophobia among medical students, the future doctors. This article aims to study attitudes of medical students of the University of Hong Kong towards homosexuality and to identify significant factors affecting their attitudes. A cross-sectional study was performed on students of the University of Hong Kong. Attitudes towards homosexuality were compared between medical and non-medical students. More than 25% of the medical students agreed with the statement 'homosexuality is a psychological disorder that requires therapy'. More than 15% would avoid any physical contact with homosexuals to minimise the chance of contracting diseases, especially AIDS. Comparison between the medical students and non-medical students showed that the attitudes of the medical students were significantly more homophobic. Factors explaining the difference included the importance of religion in the formation of moral values, gender, experience of working closely with homosexual friends, sexual orientation, experience of the heterosexual sexual act, acquaintance of homosexual friends, and experience of homosexual love relationships. In conclusion, there appeared to be a certain level of homophobia among the medical students. This could possibly be explained by their lack of experience of working closely with homosexual friends. Relevant curriculum modification and development are urgently needed, to provide ongoing opportunities for students to realise their own values that could unconsciously affect their clinical judgements. Copyright © 2009 Taylor & Francis.