The present invention relates to methods and pharmaceutical compositions for the treatment of bacterial infections in patients suffering from cirrhosis. In particular, the present invention relates to a method of treating bacterial infection in a patient suffering from cirrhosis comprising administering to the patient a therapeutically effective amount of a TLR7 and/or TLR8 agonist.