Anil Ambani's not going to jail after all, and Ericsson AB got its money. The Swedish company's lawyers should take a bow.

While the future of the Indian tycoon's shrinking empire remains shrouded in uncertainty, at least questions over his near-term living arrangements got answered on Monday. Ambani thanked his "respected" elder brother, Mukesh, and sister-in-law, Nita, after avoiding a three-month prison term. India's richest man showed up just in time to help his younger sibling who has, in a little over a decade, lost 99 percent of his $31 billion net worth.

The local unit of Ericsson had accepted a Rs 550 crore ($80 million) settlement to keep its petition for Reliance Communications Ltd.'s $7 billion bankruptcy in abeyance. The telecom equipment vendor subsequently won a contempt-of-court order to put Chairman Anil Ambani in jail if the long-delayed payment - which he personally guaranteed - wasn't received by Tuesday.

When a history of the early years of India's 2016 bankruptcy code is written, Ericsson's lawyers will deserve a glowing mention. For an unsecured creditor to walk away with a 48 percent recovery of its claim - while secured lenders wait patiently for RCom to sell its spectrum, redevelop its land assets and pay them something - shows that the Swedish firm played its cards well.

It also shows the secured creditors, led by State Bank of India, in a rather poor light. They have been deluding themselves since June 2017, when they agreed to an out-of-court restructuring, including a plan to convert part of their debt into equity at almost 25 rupees a share. Luckily that plan went nowhere. RCom shares closed on Monday at 4 rupees.

A revised restructuring later that year also saw little progress. RCom, having decided to exit its money-losing 2G and 3G mobile operations, planned to offload spectrum, fiber and media convergence nodes to Mukesh Ambani's hyper-aggressive 4G service. RCom and Jio officially called off the deal on Monday, just as the younger Ambani got bailed out by his brother. With RCom now seeking an in-court bankruptcy resolution, banks are back to square one.

To see just how badly they have bungled RCom, consider the stinging rebuke the lenders received from an appeals judge at India's bankruptcy tribunal last week:

"You (State Bank of India) have failed. JLF (joint lenders' forum) has failed. No sale (of assets) took place. You clapped with RCom and claimed that you would recover around Rs 37,000 crore ($5.4 billion) from sale to Jio ... You failed ..."

Even now, the lenders have no real plan. Jio's entry has crashed prices of telecom services, and led to shutdowns and bankruptcies, including of RCom. Mukesh Ambani may still have appetite for assets controlled by his younger brother, but a bidding war is doubtful.

Recent comments by the founder of India's most successful telecom company, Bharti Airtel Ltd. Chairman Sunil Mittal, should worry the banks deeply. When reporters asked Mittal on the sidelines of the Mobile World Congress in Barcelona if he'd bid for RCom's spectrum out of bankruptcy, he questioned the very premise of airwaves being sold by tribunal-appointed resolution professionals. The spectrum was a sovereign asset belonging to the Department of Telecommunications, Mittal said, according to an Economic Times report. He asked why the DoT didn't take the spectrum back and pool it with its own auctions.

As secured lenders cringe at that thought, Ericsson's lawyers can bask in their success. First, they snagged a sweet deal by exploiting RCom's initial reluctance to enter in-court bankruptcy. Then, they succeeded in getting a credible jail risk for Anil Ambani thrown into the mix to ensure the deal was honored. Finally, they got their client $80 million. Really nicely done.

(Andy Mukherjee is a Bloomberg Opinion columnist covering industrial companies and financial services. He previously was a columnist for Reuters Breakingviews. He has also worked for the Straits Times, ET NOW and Bloomberg News.)

Disclaimer: The opinions expressed within this article are the personal opinions of the author. The facts and opinions appearing in the article do not reflect the views of NDTV and NDTV does not assume any responsibility or liability for the same.