Disclosed is a polymeric ionic compound comprising at least 5 imidazolium groups which compound is obtainable by simultaneously reacting glyoxal formaldehyde at least one C4 C8alkylene diamine at least one protic acid and a C8 C20alkylamine especially by simultaneously reacting glyoxal formaldehyde hexylene diamine acetic acid and dodecylamine. The polymeric ionic compound comprising at least 5 imidazolium groups shows advantageous antimicrobial properties and may be used in various formulations for application fields including plant protection personal care home care industrial or institutional or hospital disinfection material protection or pharmaceuticals.