Sears Holdings Corp. is working again with ESL Investments, this time for access to a $500 million secured loan facility.

The borrowers are certain subsidiaries of Sears, and the lenders under the loan facility are entities affiliated with ESL. Sears said the terms of the loan facility were approved by its board’s subcommittee on related party transactions. Outside advice also was obtained from Centerview Partners and the law firm of Weil Gotshal & Manges.

The new loan facility matures in July 2020. Sears said $321 million has been funded, and up to an additional $179 million may be drawn by the borrowers in the future.

Sears said the loan facility was secured by mortgages on 46 real properties owned by the company’s subsidiaries. Should the retailer seek to borrow the additional $179 million available, access to the funding will be secured by mortgages on additional properties owned by Sears’ subsidiaries. The loan agreement provides for interest at a rate of 8 percent a year and is guaranteed by the company.

Sears also said the new loan will give it time to market assets from its real estate portfolio, with the proceeds used primarily to “repay outstanding indebtedness.”

Jason M. Hollar, Sears’ chief financial officer, said, “This loan facility will provide Sears Holdings with additional financial flexibility and support our operations as we meet all of our financial obligations.”

Sears’ chairman Edward S. Lampert is also the chairman of ESL, a hedge fund. Lampert’s ESL bailed Kmart Holdings Corp. out of bankruptcy in 2003, which then merged with Sears, Roebuck and Co. in 2005 in an $11 billion deal to form Sears Holdings.

Last week Sears went to ESL for standby letters of credit in an initial amount of up to $200 million. The same facility gives the retailer access for up to an additional $300 million in standby letters of credit.

Sears on Jan. 6 will close another 30 stores, mostly Kmart locations. By the close of the fiscal year at the end of January, it will have shuttered or be in the process of closing more than 200 stores. Sears will likely begin its new fiscal year in February with less than 1,500 stores. When the company was newly formed following the 2005 merger, it operated more than 3,500 stores combined.

Over the years Lampert has used his financial wizardry to spin off assets, such as Lands’ End, and monetize Sears’ real estate, such as selling 235 Sears and Kmart locations to form real estate investment trust Seritage Growth Properties.

The company is still in the process of trying to find a buyer for its Kenmore, Craftsman and DieHard brands, as well as its Sears Home Services business.