Finite groups \(G\) such that \(G/Z(G) \simeq C_2 \times C_2\) where \(C_2\) denotes a cyclic group of order 2 and \(Z(G)\) is the center of \(G\) were studied in \cite{casofinito} and were used to classify finite loops with alternative loop algebras. In this paper we extend this result to finitely generated groups such that \(G/Z(G) \simeq C_p \times C_p\) where \(C_p\) denotes a cyclic group of prime order \(p\) and provide an explicit description of all such groups.