The present invention relates to the use of an optimized truncated flagellin (TLR5 agonist devoided of toxic effect) for preventing or treating respiratory tract infection. Both preventive and currative effects in the absence of any antibiotic have been demonstrated in a mouse model of infection with S. Pneumoniae. Action mechanism of this immunomodulator includes neutrophil infiltration into airways, upregulation of IL6, TNFa, CXCL1, CXCL2 and CCL20 genes and complete restoration of lung architecture within one week after treatment. Promising data obtained with this novel immunomodulator in combination with antibiotics in various mouse models (infection and superinfection/lung inflammation) open new doors in the field of prevention and treatment of nosocomial infections.