NEW YORK (Reuters) - A New York state judge has dismissed a lawsuit accusing the Sequoia Fund, known for its ties to Warren Buffett, of recklessly making a huge, disastrous investment in Valeant Pharmaceuticals International Inc VRX.TO, causing billions of dollars of losses.

The headquarters of Valeant Pharmaceuticals International Inc is seen in Laval, Quebec in this file picture taken November 9, 2015. REUTERS/Christinne Muschi/File Photo

Justice O. Peter Sherwood of the State Supreme Court in White Plains, New York, said Sequoia shareholders failed to show it would have been futile, prior to suing in January 2016, to demand that the mutual fund’s directors step in to unwind the investment because of their alleged conflicts of interest.

The judge said the shareholders could try to amend their complaint, but that this appeared to be “a fool’s errand.”

Sherwood issued his ruling during a Feb. 15 hearing. A transcript was made public eight days later.

Sequoia shareholders had sued Sequoia’s investment adviser Ruane, Cunniff & Goldfarb; portfolio managers Robert Goldfarb and David Poppe; and three directors including author and chairman Roger Lowenstein.

The defendants were accused of gross negligence for letting Sequoia plow nearly one-third of its assets into Valeant, despite a policy capping its stake at 25 percent.

Lawyers for the shareholders did not immediately respond to requests for comment on Friday.

Valeant shares have tumbled 93 percent in the last 1-1/2 years amid criticism of the Canadian drug company’s pricing and business practices, and regulatory and congressional probes.

Goldfarb, who co-managed Sequoia for 36 years, retired as Ruane, Cunniff’s chief executive last March.

Sequoia sold its last Valeant shares in June, but its losses have left it still trailing 98 percent of its peers over five years, while assets have shrunk by more than half to $4.2 billion, Morningstar said on Friday.

Amy Roy, a lawyer at Ropes & Gray, which represents Sequoia, said its independent directors were gratified that Sherwood “recognized the central oversight role of mutual fund boards.”

Poppe, who remains at Sequoia, told shareholders last July that the fund had experienced “interesting times,” and that “our goal is to be much less interesting” in the future.

Ruane, Cunniff's late founder, William Ruane, was a friend and classmate of Buffett. When Buffett shut his investment partnership in 1969 to focus on Berkshire Hathaway Inc BRKa.N, he recommended that clients invest with Ruane.

Sequoia’s largest current investment is Berkshire. Buffett last April called Valeant’s business model “enormously flawed,” and Berkshire Vice Chairman Charlie Munger last week called Valeant’s story “too good to be true.”

The case is Epstein et al v. Ruane, Cunniff & Goldfarb Inc et al, New York State Supreme Court, New York County, No. 650100/2016.