A compound selected in the group consisting in dimercaptosuccinic acid (DMSA) and mercaptosuccinic acid (MSA) for use in a method of treating a bacterial infection, pharmaceutical compositions comprising DMSA or MSA, and a method for inhibiting ß-lactamases of bacteria in warm-blooded animals, comprising administering to warm-blooded animals a ß-lactamase inhibiting effective amount of at least DMSA or MSA.