Base excision repair (BER) is one of the most commonly used DNA repair pathways involved in genome stability. X-family DNA polymerases (PolXs) play critical roles in BER, especially in filling single-nucleotide gaps. In addition to a polymerase core domain, bacterial PolXs have a polymerase and histidinol phosphatase (PHP) domain with phosphoesterase activity which is also required for BER. However, the role of the PHP domain of PolX in bacterial BER remains unresolved. We found that the PHP domain of Thermus thermophilus HB8 PolX (ttPolX) functions as two types of phosphoesterase in BER, including a 3'-phosphatase and an apurinic/apyrimidinic (AP) endonuclease. Experiments using T. thermophilus HB8 cell lysates revealed that the majority of the 3'-phosphatase and AP endonuclease activities are attributable to the another phosphoesterase in T. thermophilus HB8, endonuclease IV (ttEndoIV). However, ttPolX possesses significant 3'-phosphatase activity in ΔttendoIV cell lysate, indicating possible complementation. Our experiments also reveal that there are only two enzymes that display the 3'-phosphatase activity in the T. thermophilus HB8 cell, ttPolX and ttEndoIV. Furthermore, phenotypic analysis of ΔttpolX, ΔttendoIV, and ΔttpolX/ΔttendoIV using hydrogen peroxide and sodium nitrite supports the hypothesis that ttPolX functions as a backup for ttEndoIV in BER.