Spain’s Repsol (<a href="https://www.bolsasymercados.es/bme-exchange/es/Mercados-y-Cotizaciones/Acciones/Mercado-Continuo/Ficha/Repsol-ES0173516115" target="_blank">BME:REP</a>) has agreed to sell its 40% stake in US solar and storage developer Hecate Energy Group (HEG) to joint venture partner Hecate Holdings LLC, bringing an end to a protracted legal dispute between the two companies, the oil-and-gas major said on Thursday.