(Reuters) - PIF, the Saudi Arabian sovereign wealth fund that Tesla Inc TSLA.O CEO Elon Musk has said could help him fund a $72 billion deal to take his electric car maker private, is in talks to invest in aspiring Tesla rival Lucid Motors Inc, people familiar with the matter said on Sunday.

California-based Lucid Motors unveiled a prototype of a luxury sedan the Lucid Air at its unveiling in Fremont, California, U.S., December 14, 2016. REUTERS/Alexandria Sage

The talks between privately-held Lucid Motors and PIF underscore the latter’s appetite to invest in electric car makers to diversify the oil-rich Middle Eastern kingdom’s investment portfolio.

A deal with Lucid Motors would also be more in line with PIF's limited resources, given that, despite its $250 billion in assets, PIF has already made substantial commitments to other technology companies or investments, including a $45-billion agreement to invest in a giant technology fund led by Japan's SoftBank Group Corp 9984.T.

PIF and Lucid Motors have drawn up a term sheet under which PIF could invest more than $1 billion in Lucid Motors and obtain majority ownership, the sources said. PIF’s first investment in Lucid Motors, however, would be for $500 million, and subsequent cash injections would come in two stages that are contingent on Lucid Motors hitting certain production milestones, one of the sources added.

The talks between PIF and Lucid Motors may not result in a deal, the sources cautioned.

The sources asked not to be identified because the matter is confidential. PIF and Lucid Motors did not immediately respond to requests for comment.

Musk, a 47-year-old investor and engineer, stunned financial markets earlier this month, when he revealed on Twitter he was considering a $420 per share take-private deal for Tesla, an auto manufacturing pioneer that developed the world’s first ever premium all-electric sedan car.

He added that funding was “secured,” and elaborated last Monday that he believed Saudi Arabia’s PIF could provide the necessary funding, although sources close to the sovereign wealth fund have played down that prospect. Earlier this year, PIF built a stake of just under 5 percent in Tesla by snapping up shares in the open market, rather than acquiring newly issued shares.

Musk has also said he believes two-thirds of existing Tesla shareholders would roll over their holdings into a private company, rather than cash out, and that he was still talking with major shareholders and advisers before settling on a structure for a deal.

Getting access to cheap capital is a constant challenge for automakers, which can spend $1 billion or more engineering a single new model and bringing it to mass production, only to have the vehicle flop because of a cyclical sales slump or a shift in market tastes.

Based on the edges of Silicon Valley in Newark, California, Lucid Motors was founded in 2007 as Atieva by Bernard Tse, a former Tesla vice president and board member, and Sam Weng, a former exec at Oracle Corp and Redback Networks. It received backing from Chinese investors, including tech entrepreneur Jia Yueting and state-owned automaker BAIC. Other venture capital backers have included Venrock, Mitsui & Co and Tsing Capital.

Lucid Motors is not yet selling any cars. In 2016, it unveiled a prototype of its Lucid Air model, a $100,000 luxury sedan it had hoped to begin building in Arizona in late 2018. It is not clear when this car will become available, though the company is accepting refundable deposits of $2,500 from consumers on its website.

Tesla is much more advanced as an electric car manufacturer, though investors are questioning how long can it go before turning a profit. It has been burning through cash as it has aggressively ramped up Model 3 production, a process Musk has called “production hell.”

Analysts at UBS last week questioned the profitability of the Model 3, in a report that said Tesla could lose $6,000 on every base model.