If we needed another example of Warren Buffett’s investing brilliance, look no further than the news that Sears has reportedly moved closer to the dustbin of fallen retailers.

Buffett’s Berkshire Hathaway loaned Seritage Partners (SRG), a publicly-traded real estate investment trust (REIT) spun off from Sears in 2015, up to $2 billion on July 31. Buffett received a 7% fixed rate of interest on the first $1.6 billion of his loan. Seritage was given an additional option to borrow up to $400 million by July 31, 2023.

Seritage, spun off from Sears using the retailers’ best stores as underlying assets, owns 222 properties, many of them leveraged to the fortunes of Sears. A total of 144 of the stores are Sears locations that pay rent back to the holding company Seritage. Should Sears go under, Seritage could lose the bulk of its vital fee income and possibly not survive. The remaining are sites Seritage is actively developing for other uses – such as apartments – that pay it more fee income than a typical Sears store. Buffett’s loan was partially used by Seritage to help refurbish once former Sears locations and rent them to new tenants.

Besides netting the fat interest payment on the loan to Seritage, Buffett also gained senior secured creditor status. That effectively put Berkshire first in line to get its $2 billion repaid by Seritage’s assets if it goes under and they must be sold off. If Seritage is unable to pay Berkshire’s loan back in full from those asset sales, Buffett could take possession of a good chunk of the company’s lucrative real estate holdings.

Sears is on its last legs. Yahoo Finance shares the numbers you need to know.

“I rarely see Warren Buffett make a bad investment,” remarked Sid Scheinberg, a restructuring expert at law firm Godwin Bowman PC. Scheinberg says Buffett’s loan is well protected in the event Sears drags down Seritage. “He will own some very valuable real estate,” Scheinberg says.

The longer-term outlook for Seritage is certainly in question with Sears’ troubles on the rise.

Cash-strained Sears has hired advisory firm M-III Partners to prepare a bankruptcy filing that could arrive as soon as this week, according to a report in The Wall Street Journal. Sears is still looking at other restructuring options as CEO Eddie Lampert seeks to avert a messy overhaul in bankruptcy court, the Journal says. Most corporate bankruptcy experts Yahoo Finance spoke with, however, say a filing is inevitable and Sears has likely already lined up what’s known as debtor-in-possession financing.

“You don’t announce bankruptcy filing news if you aren’t really ready to do it,” says bankruptcy expert Jordi Guso of law firm Berger Singerman. “It’s almost certain Sears has lined up a financing commitment or another one from Lampert.”

With a $134 million debt repayment due Oct. 15, a bankruptcy filing for Sears that allows it to shutter scores of unprofitable stores may be the only feasible outcome to keep the lights on another year at its best locations. Sears burned through $1 billion in cash during the first six months of the year. The company had a mere $193 million in cash on its balance sheet ahead of the critical holiday shopping season, when having enough cash is so important for placing orders with vendors.

Sears and M-III Partners didn’t return Yahoo Finance’s request for comment. Shares of Sears were more than 25% lower in midday trading on Wednesday.

Brian Sozzi is an editor-at-large at Yahoo Finance. Follow him on Twitter @BrianSozzi

Read more:

Philip Morris International tries risky move of making cigarettes extinct

PepsiCo isn’t looking at a ‘substantive’ breakup, CFO says

3 massive problems J.C. Penney’s new CEO must solve

Snap CEO reportedly says its redesign was botched in an internal memo