Solar panel installer SolarCity, which is being bought by Tesla Motors, said it had raised $305 million in a cash equity transaction advised by billionaire investor George Soros’ hedge fund.

Shares of the company, which is backed by Tesla founder Elon Musk, were up 6.6% at $17.89 in afternoon trading on Monday.

A private investment fund affiliated with Quantum Strategic Partners provided the equity investment in a portfolio of residential, commercial, and industrial solar projects, the company said.

The fund was advised by Soros Fund Management.

This is the second cash equity transaction by the debt-laden solar company this year. The company in May received a $227 million investment from John Hancock in a diversified portfolio of residential, commercial, and industrial solar power projects.

Monday’s transaction included an 18-year-loan syndicated to five institutional investors, SolarCity said.

Get Data Sheet, Fortune’s technology newsletter.

Bank of America Merrill Lynch bac acted as the sole syndication and structuring agent for the transaction.

The solar company said last month it faced greater-than-usual delays in closing new project financing commitments due to its takeover talks with Tesla tsla .

For more, read: Here’s Why Solar Farms Are Booming in the U.S.

Up to Friday’s close of $16.77, SolarCity’s shares scty had lost more than a fifth of its value since Tesla made its first offer in June.