The more a person drinks the more likely they are to have unprotected sex, according to research.
Experts found that for every slight increase in alcohol consumption, a person's willingness to engage in risky sex got stronger.
This held true even when other factors, such as sensation-seeking or a general tendency to risky behaviour, were taken into account.
Experts from the University of Toronto analysed the results of 12 studies involving men and women which looked at the relationship between alcohol and unsafe sex.
After pooling the results, they found alcohol consumption affects decision-making, and this impact rises with the amount of alcohol consumed.
Every increase in blood alcohol level of 0.1 mg/ml led to a 5% increase in the intention to engage in unprotected sex.
The UK legal limit for drivers is 80mg of alcohol per 100ml of blood.
Writing in the journal Addiction, the team concluded: "Alcohol use is an independent risk factor for intentions to engage in unprotected sex, and as risky sex intentions have been shown to be linked to actual risk behaviour, the role of alcohol consumption in the transmission of HIV and other sexually transmitted infections may be of public health importance."
Dr Jurgen Rehm, lead author on the study, said: "Drinking has a causal effect on the likelihood to engage in unsafe sex, and thus should be included as a major factor in preventive efforts for HIV.
"This result also helps explain why people at risk often show this behaviour despite better knowledge: alcohol is influencing their decision processes."
Yusef Azad, director of policy and campaigns at the National AIDS Trust, said: "We have known for some time about the association between alcohol and sexual risk taking - this important study clarifies the independent role alcohol can play in the intention to have unsafe sex.
"It means we need better link-up between alcohol and drugs programmes and sexual health services, with support available for those concerned about their sexual risk who want help in reducing problematic alcohol use."
Rebecca Findlay, from the Family Planning Association (FPA), said: "People think they'll always use a condom but when they're drinking this is easily forgotten and they end up having unprotected sex possibly with someone they wouldn't normally sleep with.
"We're often contacted by people the morning after worried about their health and bitterly regretting what's happened.
"Our advice is when you're still sober think about whether you want to risk unprotected sex, accept that alcohol will impair your judgment and make sure you have condoms with you, you're prepared to use them and talk about them with your partner."