Oct 18 (Reuters) - Spanish renewables developer Grenergy said on Wednesday it has agreed to sell a 297 megawatt (MW) portfolio consisting of two solar photovoltaic projects to a fund owned by German insurer Allianz SE.

The transaction, made on behalf of Allianz insurance companies and institutional investors, is worth 271 million euros ($287 million), Grenergy said in a statement.

The two plants are due to start producing electricity in the second half of 2024 and the transaction is expected to be completed on June 30, 2025.

Grenergy will use the proceeds of the sale to finance its future growth, the company said.

Larger Spanish energy companies such as Iberdrola or Repsol have also been raising cash to invest in new projects by selling more advanced ones.

($1 = 0.9448 euros) (Reporting by Marta Serafinko; editing by Inti Landauro and Jason Neely)