The present invention relates to nucleic acid sequences encoding a hydroxyphenylpyruvate dioxygenase (EC 1.13.11.27, abbreviated herein as HPPD) obtained from bacteria belonging to the subfamily Synechococcoideae, as well as the proteins encoded thereby, and to a chimeric gene which comprises such nucleic acid sequence, and to the use of such nucleic acid sequences, proteins or chimeric genes for obtaining plants which are tolerant to HPPD inhibitor herbicides.