Cosan and energy giant Royal Dutch Shell have entered into $12bn agreement to merge ethanol and fuels distribution units across the country.

Under the agreement, the Brazil’s ethanol and sugar processor Cosan will transfer its sugar, ethanol, fuels distribution and energy generation business, with assets valued at $4.925bn and debt of $2.524bn, to the merged entity.

Shell will provide its retail fuels and aviation distribution business and will introduce about $1.625bn into the merged company in up to two years, Cosan said.

Cosan will provide another $300m in cash over five years.

The companies have 180 days to discuss the non-binding memorandum of understanding exclusively, Cosan said.