Structure-specific nuclease with 5'-flap endonuclease and 5'- 3' exonuclease activities involved in DNA replication and repair. During DNA replication, cleaves the 5'-overhanging flap structure that is generated by displacement synthesis when DNA polymerase encounters the 5'-end of a downstream Okazaki fragment. It enters the flap from the 5'-end and then tracks to cleave the flap base, leaving a nick for ligation. Also involved in the long patch base excision repair (LP-BER) pathway, by cleaving within the apurinic/apyrimidinic (AP) site- terminated flap. Acts as a genome stabilization factor that prevents flaps from equilibrating into structures that lead to duplications and deletions. Also possesses 5'-3' exonuclease activity on nicked or gapped double-stranded DNA, and exhibits RNase H activity. Also involved in replication and repair of rDNA and in repairing mitochondrial DNA. {ECO:0000255|HAMAP-Rule:MF_03140, ECO:0000269|PubMed:10744741, ECO:0000269|PubMed:11986308, ECO:0000269|PubMed:18443037, ECO:0000269|PubMed:20729856, ECO:0000269|PubMed:26751069, ECO:0000269|PubMed:7961795, ECO:0000269|PubMed:8621570}. This is the function of Ensembl gene identifier ENSG00000168496 (FEN1, flap structure-specific endonuclease 1).