Foxconn will buy the factory currently being used by Lordstown Motors for around $230 million and has also agreed to build the automaker’s electric Endurance pickup truck at the plant.

Lordstown has been in dire straits in recent months after investigations from the Securities and Exchange Commission (SEC) and the U.S. Justice Department. In June, Lordstown said it wouldn’t be able to start production of the Endurance unless it raised more money. That’s what Foxconn is providing.

Read More: Lordstown Gets Lifeline As Investment Firm Agrees To Buy $400 Million Worth Of Stock

The Taiwanese company’s deal with the electric vehicle startup will also see it buy $50 million worth of Lordstown Motors shares, which ups the total investment to $280 million. The Lordstown site will also be Foxconn’s first automotive factory and comes as it tries to establish itself as a serious contender in the electric vehicle space. It has previously struck deals with the likes of Geely and Fisker.

Lordstown Bough The Ohio Plant From GM For $20 Million In 2019

Lordstown famously purchased the Ohio factory from General Motors in 2019 for just $20 million after the Detroit automaker announced plans to close it down and stop production of the Chevrolet Cruze. The Verge reports that the electric startup has invested $240 million into equipping the factory to begin producing its pickup truck.

The deal excludes asserts such as Lordstown’s electric hub motor assembly line, battery module and packing line assets, and certain intellectual property rights. It has also been confirmed that reaching a contract manufacturing agreement was a key condition to closing the purchase of the factory.

In July, Lordstown secured a lifeline after investment firm Yorkville Advisors committed to buying up to $400 million of shares from the company.