Lucid Motors, the electric car startup that aims to compete with Tesla, will receive an eye-popping $1 billion in funding from Saudi Arabia’s sovereign wealth fund, the kingdom announced on Monday. The investment will finance Lucid Motor’s 2020 commercial launch of its first electric vehicle, the Lucid Air. Meanwhile, Tesla’s stock dipped by as much as 2 percent in early trading on news of the investment.

The deal is a major win for Lucid, which has languished over the last year as it failed to secure the funding necessary to start making its luxury electric cars. News of the talks comes weeks after Saudi Arabia purchased 5 percent of Tesla and emerged as a central player in Elon Musk’s failed effort to take the company private again. Musk cited conversations with the director of the Saudi fund as the impetus for his push to take Tesla private.

The deal is a major win for Lucid

Under the agreement, Lucid will use the funding to complete engineering development and testing of the Lucid Air; construct its factory in Casa Grande, Arizona; begin the global rollout of its retail strategy starting in North America; and enter production for the Lucid Air.

“The convergence of new technologies is reshaping the automobile, but the benefits have yet to be truly realized,” Peter Rawlinson, chief technology officer of Lucid (and a former executive at Tesla), said in a statement. “This is inhibiting the pace at which sustainable mobility and energy are adopted. At Lucid, we will demonstrate the full potential of the electric connected vehicle in order to push the industry forward.”

A spokesperson for the Saudi Public Investment Fund said: “By investing in the rapidly expanding electric vehicle market, PIF is gaining exposure to long-term growth opportunities, supporting innovation and technological development and driving revenue and sectoral diversification for the Kingdom of Saudi Arabia.”

Lucid Motors unveiled the Air at the Los Angeles Auto Show in 2016. It brought a prototype version to CES in 2017 and spent the rest of the year slowly letting out more information about the car, including its estimated price (the base model will cost about $60,000) and ship date (2019). It also slowly showed off the car’s impressive performance capabilities.

Atieva, the parent company that runs Lucid Motors, has not been able to come up with enough money to put the Lucid Air into production. The company has locked down a site in Arizona where it wants to build a $700 million factory, but it has had trouble securing a new round of funding to help make that happen. Ford was rumored to be interested in buying the company last summer, but a deal never materialized. Aside from moving to a new headquarters in December, the company has been mostly silent over the past year.