The present invention relates to beta-O/S/N fatty acids and derivatives thereof, in particular the compounds of formula (I) as described and defined herein, and their pharmaceutical use, including their use in the treatment or prevention of bacterial as well as protozoan infections, in particular the treatment or prevention of infections with Gram-positive and/or Gram-negative bacteria and infectious diseases caused by and/or related to Gram-positive and/or Gram-negative bacteria. The invention further relates to the use of these compounds for preventing or eliminating biofilms.