OTTAWA  The largest leveraged buyout in history skirted a potentially crushing blow on Friday.

The Supreme Court of Canada unanimously ruled in favor of Bell Canada and its purchasers late Friday, saying that the deal can proceed. While the ruling ends a challenge from bondholders, the $52 billion buyout still faces uncertainty over its financing and, more broadly, questions about the value of the company.

In a move that almost no one foresaw, an appeals court in Quebec, Bell’s home province, refused last month to approve the sale to a group led by the Ontario Teachers’ Pension Plan and its partners, including Providence Equity Partners and Madison Dearborn Partners.

The deal was structured under a Canadian system that requires both shareholder and court approval. The appeals court, however, refused to back the deal after finding that the company had not fairly considered the interests of current bondholders. By adding about $34 billion debt to Bell, the buyout would depress the value of the company’s current debentures.

The decision surprised most corporate law specialists in Canada who generally assume that, as in the United States, directors must consider only the needs of shareholders when making decisions about takeovers.