We have recently identified the enzyme NMN deamidase (PncC), which plays a key role in the regeneration of NAD in bacteria by recycling back to the coenzyme the pyridine by-products of its non redox consumption. In several bacterial species, PncC is fused to a COG1058 domain of unknown function, highly conserved and widely distributed in all living organisms. Here, we demonstrate that the PncC-fused domain is endowed with a novel Co(+2)- and K(+)-dependent ADP-ribose pyrophosphatase activity, and discuss the functional connection of such an activity with NAD recycling. An in-depth phylogenetic analysis of the COG1058 domain evidenced that in most bacterial species it is fused to PncC, while in α- and some δ-proteobacteria, as well as in archaea and fungi, it occurs as a stand-alone protein. Notably, in mammals and plants it is fused to FAD synthase. We extended the enzymatic characterization to a representative bacterial single-domain protein, which resulted to be a more versatile ADP-ribose pyrophosphatase, active also towards diadenosine 5'-diphosphate and FAD. Multiple sequence alignment analysis, and superposition of the available three-dimensional structure of an archaeal COG1058 member with the structure of the enzyme MoeA of the molybdenum cofactor biosynthesis, allowed identification of residues likely involved in catalysis. Their role has been confirmed by site-directed mutagenesis.