(Reuters) -Lordstown Motors Corp has agreed a deal under which a Foxconn affiliate will invest up to $170 million in the electric vehicle (EV) maker, making the Taiwanese contract manufacturer its biggest shareholder with a near 20% stake.

Foxconn Ventures Pte Ltd will purchase 12.9 million shares on or after Nov. 22 and an additional 26 million shares that will propel Foxconn’s holdings to 19.3% of Lordstown’s common stock and all of its preferred stock, surpassing founder Stephen Burn’s stake of 17.2%, according to Refinitiv.

Lordstown will use the proceeds from the share sales to fund development and design activities for a new electric vehicle program in collaboration with Foxconn, scrapping its earlier joint venture deal with the manufacturer, it said in a filing, sending shares up 7% to $2.06 in extended trading on Monday.

Foxconn said the deal would deepen Lordstown’s ties with Foxconn’s EV development platform MIH, or Mobility in Harmony.

“In the future, there will also be opportunities to share LMC’s technical resources with other customers, further expanding the MIH EV ecosystem, and enabling customers to choose better solutions and be more competitive,” Foxconn said.

Separately, the startup reported a net loss of $154.4 million in the quarter ended Sept. 30, wider than loss of $95.8 million, a year earlier.

While demand for electric vehicles has surged globally, supply chain disruptions and rising material costs have made it tough for companies to raise output and meet red-hot demand.

Foxconn started manufacturing Lordstown’s Endurance pickup trucks in September after buying the U.S. company’s Ohio facility. The deal was prompted by the need to clinch funds essential for the start of production of Endurance.

Lordstown expects to limit production of the Endurance through 2023 or longer to minimize losses, until it is able to cut its materials cost.

Lordstown said on Monday that its cost of materials to build its Endurance electric pickup truck was higher than the price it intends to sell at, adding that it would not see positive gross margins until its bill of materials cost reduced.

(Reporting by Mehnaz Yasmin and Akash Sriram in Bengaluru; Additional reporting by Sarah Wu in Taipei; Editing by Shailesh Kuber and Kenneth Maxwell)