Patients awaiting surgery have been warned against drinking too much before their operation.
Post-surgical infections can cause serious problems
Doctors in Spain have found that patients who drink too heavily before surgery have a much higher risk of infection afterwards.
Their study of 717 male patients found those who drank heavily were almost twice as likely to suffer an infection compared to other patients.
People who drank six or more glasses of wine a day appeared to be most at risk.
Doctors at the University of Jaen originally looked at the medical records of 1,505 patients.
However, they excluded female patients because very few of them were heavy drinkers.
Of the 717 men who were left in the study, 178 were classified as moderate or heavy drinkers.
Medical records showed that just 15% of patients who were non-drinkers developed post-surgical or nosocomial infections.
This compares to 25% of patients who were moderate or heavy drinkers.
Anybody who is a heavy drinker is immunologically suppressed
Mr David Rosin,
Of the 75 patients who developed surgical-site infection while in hospital, 75% consumed six or more glasses of wine.
The study found that patients who drank only at weekends did not have an increased risk of infection after surgery.
"Heavy alcohol consumption increased the risk of nosocomial infection in men who underwent general surgical procedures," the doctors said.
The doctors urged patients to be aware of the risks and to cut down on their drinking if they are due to undergo surgery.
Mr David Rosin, a consultant surgeon and senior member of the Royal College of Surgeons of England, backed the findings.
"Anybody who is a heavy drinker is immunologically suppressed," he told BBC News Online.
"That means that their immune system is not as good as someone who doesn't drink. They are going to be more prone to things like infection.
"I think most surgeons are aware of this but it is very difficult to do anything about it. Just like smoking, many patients find it difficult to stop."