Has flap endonuclease activity. During DNA replication, flap endonucleases cleave the 5'-overhanging flap structure that is generated by displacement synthesis when DNA polymerase encounters the 5'-end of a downstream Okazaki fragment. Binds 2 Mg(2+) per subunit. Only one magnesium ion has a direct interaction with the protein, the other interactions are indirect. Binds 1 K(+) per subunit. The potassium ion strongly increases the affinity for DNA. Belongs to the Xni family. Extended N-terminus.