By Andrés González and Isla Binnie
The transaction values the whole company, which builds and operates photovoltaic plants in the United States, Europe, Africa and Asia, at around 1.05 billion euros ($1.17 billion) including debt, two of the sources said.
Brookfield plans to buy a 20% stake in the company from the Riberas family, an industrial dynasty from northern Spain that founded car parts maker Gestamp.
It also plans to acquire a further 30% stake in the company from KKR, which bought 80% of X-Elio from the family in 2015. KKR will continue to hold the remaining 50% of X-Elio.
Brookfield, KKR and X-Elio declined to comment. A spokesman for the Ribera family did not respond to a request for comment.
Slumping installation costs and widespread political support have stoked investor interest in solar power, even as governments start cutting the once-rich pickings to be found through building subsidized plants.
Most of X-Elio's more than 78 solar plants and almost half its staff are located outside Spain.
The International Energy Agency has called for more investment globally in low-carbon energy, which was stable last year at about $620 billion.
In Spain, the acting government of Prime Minister Pedro Sanchez has outlined ambitious plans to boost renewable generation, including a five-fold increase in solar photovoltaic generation by 2030.
(Reporting by Isla Binnie; Editing by Kirsten Donovan)
By Andrés González and Isla Binnie