Anhydrous topical gel composition of mupirocin or its salts comprising: a) a lipophilic base selected from the group consisting of petrolatum, medium-chain triglycerides, isopropyl myristate and mixtures thereof; b) a bioadhesive selected from the group comprising polyvinylpyrrolidone and polymethacrylates; and c) a solvent selected from the group comprising ethanol, propanol, and isopropanol; which is stable and shows an increased residence time of the active ingredient in the skin, resulting in an improved clinical effect in the treatment of bacterial skin infections while maintaining the safety profile of the commercial pharmaceutical product.