The invention relates to a recombinant DNA molecule encoding a polypeptide having phytase activity and increased temperature stability and increased proteolytic stability of the enzyme activity. The DNA sequence has been obtained by variation of the mature wild-type E. coli phytase sequence with defined amino acid positions being modified in comparison to the wild-type sequence or with the sequences having N- and/or C-terminal extensions, respectively. The invention further relates to a method for expressing the recombinant phytase as well as its use in the food and animal feed technologies.