Abstract : By sharing contaminated needles, injecting drug users contribute in a significant manner to the spread of the human immunodeficiency virus (HIV) in Asia and in some European countries. Furthermore, injecting drug users may also be sex workers, and risky sexual activities allow the virus to spread to other parts of the population. Mathematical models of needle sharing have been used to evaluate the success of needle ex- change programs, and have led to advances such as new legislations. We designed a compartmental model to analyse how injecting drug users may start or cease sharing needles under social influences, and may become infected with HIV when sharing. While similar models have been pro- posed for various aspects of HIV, our approach differs by using discrete Markov chains in the analysis instead of the differential equations or next- generation matrix commonly employed. Our simulations showed that the prevalence of HIV depended very little on the probability of transmission of HIV when sharing a needle, but almost only on the encouragement and discouragement regarding needle sharing in the community. By measuring the cost of resources required to decrease factors encouraging needle sharing and to increase discouraging ones, our model can be refined to provide an estimate of the expected prevalence of HIV among injecting drug users.