The accumulation of proline in response to the most diverse types of stress is a widespread defense mechanism. In prokaryotes, fungi, and certain unicellular eukaryotes (green algae), the first two reactions of proline biosynthesis occur through two distinct enzymes, γ-glutamyl kinase (GK E.C. 2.7.2.11) and γ-glutamyl phosphate reductase (GPR E.C. 1.2.1.41), encoded by two different genes, ProB and ProA, respectively. Plants, animals, and a few unicellular eukaryotes carry out these reactions through a single bifunctional enzyme, the Δ1-pyrroline-5-carboxylate synthase (P5CS), which has the GK and GPR domains fused. To better understand the origin and diversification of the P5CS gene, we use a robust phylogenetic approach with a broad sampling of the P5CS, ProB and ProA genes, including species from all three domains of life. Our results suggest that the collected P5CS genes have arisen from a single fusion event between the ProA and ProB gene paralogs. A peculiar fusion event occurred in an ancestral eukaryotic lineage and was spread to other lineages through horizontal gene transfer. As for the diversification of this gene family, the phylogeny of the P5CS gene in plants shows that there have been multiple independent processes of duplication and loss of this gene, with the duplications being related to old polyploidy events.