The SEC on Thursday withdrew an insider trading complaint against one of its most prominent targets in a generation— former Goldman Sachs board member and McKinsey & Co. leader Rajat K. Gupta.

Gupta had sued the agency, arguing that it trampled his rights by filing the case in an administrative forum instead of in federal court, where he would have greater legal protections and the right to a trial by jury. Gupta won a procedural round in July when a federal judge ruled he could proceed with his lawsuit against the SEC.

But Gupta isn’t out of the woods. Under a pact disclosed Thursday, the SEC reserved the right to file insider trading charges against him in federal court.

The SEC staff “is fully committed to the case and will proceed as appropriate,” SEC spokesman John Nester said.

Gary P. Naftalis, a lawyer for Gupta, declared victory in Gupta’s lawsuit against the SEC. He added that the SEC’s allegations against Gupta “are totally baseless and cannot withstand scrutiny.”

The SEC had accused Gupta of leaking boardroom secrets to hedge fund billionaire Raj Rajaratnam, and it filed its case shortly before Rajaratnam went on trial this year. The Galleon Management boss was convicted in one of the more sensational insider trading cases in years.

The SEC’s case against Gupta had been scheduled to advance to an administrative trial weeks ago, but an administrative judge in June postponed the proceeding for six months.

The Justice Department, which named Gupta an unindicted co-conspirator in the Rajaratnam case, sought a delay, which suggested it is still interested in Gupta, according to a Reuters report.