Four isostructural organically templated lanthanide oxalatophosphates, (H(4)APPIP)[Ln(3)(C2O4)(5.5)(H2PO4)(2)] center dot 5H(2)O (Ln = Er-Lu and APPIP = 1,4-bis(3-aminopropyl)piperazine), have been synthesized under hydrothermal conditions and characterized by single-crystal and powder X-ray diffraction. Their structures contain LnO(8) trigonal dodecahedra linked by three bis-bidentate oxalates to form layers in the (102) plane, which are connected by dihydrogen phosphate and bis-monodentate oxalate ligands to form a 3D framework. The charge-compensating tetraprotonated 1,4-bis(3-aminopropyl)piperazinium cations and lattice water molecules are located in the 12-membered ring straight channels. They are the first examples of organically templated lanthanide oxalatophosphates. The thermal stability, guest desorption-sorption properties, variable-temperature in situ powder X-ray diffraction, magnetic susceptibility, and photoluminescence spectrum of the Er compound and catalytic activity of the Yb compound for the Biginelli reaction have also been studied.