(Adds further comment from sources on potential transaction, context and background from paragraph 5)

LONDON/MADRID, May 14 (Reuters) - Spanish oil company Repsol is in negotiations to sell a stake in its renewable energy unit, a move to help fund its strategic plan through 2027, according to four sources with knowledge of the talks.

The company has received an unsolicited approach by an investor and has lined up Santander as advisor for the sale, the sources said.

Repsol would keep more than 50% of the unit in a transaction that could involve the investor injecting new money into the business, the sources said. Reuters was not able to establish the identity of the investor.

Repsol and Santander declined to comment.

Discussions were in the early stages, they added, cautioning there was no certainty that the deal would happen.

Repsol Renewables is valued at 5.9 billion euros ($6.4 billion), including debt, according to a research note published by UBS in April.

The company sold a 25% stake in the division in 2022 to French insurance company Crédit Agricole Assurances and Switzerland-based Energy Infrastructure Partner (EIP.)

The Spanish company has been selling minority stakes in renewable projects to fund new investments as part of its plan to diversify into renewables and low carbon businesses, away from its traditional oil and gas core business.

In February, it said it would push forward with this strategic shift, while confirming it still sees an important role in the energy mix for fossil fuels.

Repsol plans gross investment of up to 26 billion euros through 2027, with up to 9 billion euros of investments into low-carbon and renewable projects.

Repsol is targeting between 9 and 10 GW of installed renewable capacity by 2027. ($1 = 0.9246 euros)

(Reporting by Andres Gonzalez in London and Pietro Lombardiin Madrid, editing by Anousha Sakoui and Emelia Sithole-Matarise)