A decision by Palo Alto-based Red Rock Ventures  to borrow millions of dollars in federal money almost a decade ago has led to a potentially embarrassing court case in which the U.S. government has taken control of the fund as a result of its poor performance.

The unusual series of events was first reported earlier this week by The Recorder, a legal newspaper. Their story is here, though you need to register to read it.

In a case filed by the U.S. Small Business Administration in the federal court in the Northern District of California on Monday, the feds said essentially that the fund in question was performing so badly that the firm had violated the terms under which it borrowed $28 million from the agency.

Back in 2001, Red Rock received a license from the SBA which allowed it to apply for government funding, according to the case file reviewed by VentureBeat. (Copies of the court filings are embedded below.)

A year later, Red Rock closed its Red Rock III venture fund. Though the firm sounded optimistic coming out of the burst dot-com bubble, at least one private equity newsletter at the time reported that the amount it raised was $86 million — well below its target of $250 million.

“Our strategy with the new fund remains consistent with our past funds: to invest in and guide young companies that are first movers in a particular enterprise sector and have the potential to become market leaders,” Bob Todd, general partner at Red Rock Ventures, said in a statement at the time. “We historically have reserved large amounts of capital for follow-on investments and this has served our companies and our investors well in this environment.”

In 2006, the SBA began loaning money to Red Rock for the fund. Eventually, the agency sent 11 installments to Red Rock, totaling $28,550,194.94. SBA says Red Rock still owes it all of that money.

But in June 2009, regular statements Red Rock was required to submit to the SBA indicated a “capital impairment problem.” That means the actual value of the fund’s combined assets, income, and losses fell below the amount that investors had put into the fund.

By September 2009, the fund was impaired by more than 60 percent. By June 2011, it was 82 percent. By December 2014, it was 128.87 percent. (The calculations for impairment are actually complex, and thus a fund can technically be more than 100 percent impaired.)

Last month, the firm agreed to place Red Rock III into receivership, with the SBA as the new agent in charge.

In a separate order regarding the receivership, the court said the SBA now has the authority to administer and liquidate all of the assets in the fund to pay creditors. The SBA also assumes all of the rights previously held by the partners of the fund.

What’s not clear from the documents is which startups received funding from the fund, and which may still be active. And it also seems unclear whether the SBA could then force any of those companies that might have taken money from Red Rock to return it.

Perhaps most intriguing (or worrisome) is a little number The Recorder dug up. According to SBA data, 20 venture firms in California, including 13 in the Northern California area, have also registered with the agency for eligibility to borrow money.

Of course, it’s still a mystery what went wrong with Red Rock’s investments. The firm didn’t return The Recorder’s calls for comment.

But if the practice of borrowing money from the feds became widespread in Silicon Valley over the past decade, it will be interesting to see if the Red Rock case turns out to be the first of many.

Here is the SBA complaint against Red Rock:

Here is the receivership order: