Volkswagen has walked away from talks with Renault to jointly develop an affordable electric version of the Twingo car, two sources familiar with the situation said, in a setback for the EU carmakers' efforts to fend off Chinese rivals.

The collapse of negotiations could mean the German carmaker may have to go it alone in developing its own affordable electric vehicle (EV). Renault will continue designing its electric Twingo, scheduled to hit the market in 2026.

Both had hoped that sharing the work would cut costs that represent a key hurdle for European carmakers in the face of cheaper cars from China.

Ampere, Renault's EV operation overseeing the Twingo programme, declined to comment.

A VW spokesperson also declined to comment on the talks between the companies but said that the German carmaker was still studying its options on cheap EVs.

The companies "did not succeed in finding an agreement" after several months of negotiations, one of the sources said.

Another source said that an agreement had been very close, but that VW walked away from the talks and has decided to develop its own car.

The sources declined to be named because the talks are confidential.

VW sources said a decision on the EV plan is expected within weeks. Thomas Schaefer, CEO of the Volkswagen brand, has said he wants to launch a lower-priced EV by 2027.

The second source said Renault would continue work on the Twingo without VW, but also remained open to other partners, for instance from the alliance with Nissan and Mitsubishi.

China's automakers, the world's top EV producers, are making fast inroads in the European market, pressuring incumbents like Renault and VW to cut costs and speed up the time it takes to bring a new model to market.

European automakers are aiming to produce smaller EVs that sell below 20,000 euros ($21,686) to help them compete with Chinese brands like BYD. ($1 = 0.9223 euros)

(Reporting by Gilles Guillaume in Paris and Christina Amann in Berlin; Editing by Josephine Mason, Sharon Singleton and David Goodman)