Kevyn Orr, the emergency financial manager of the city of Detroit, recommended the city file for bankruptcy in the first place. Photograph: Zuma/Rex Features

A federal judge agreed with Detroit on Wednesday and stopped any lawsuits challenging the city's bankruptcy, declaring his courtroom the exclusive venue for legal action in the largest filing by a local government in US history.

The decision by US bankruptcy judge Steven Rhodes was a major victory for Detroit, especially after an Ingham County judge last week said that Governor Rick Snyder ignored the Michigan constitution and acted illegally in approving the Chapter 9 filing. That ruling and others had threatened to derail the case.

Retirees had sued, claiming the bankruptcy threatened their pensions that are protected by the constitution.

"If these actions are not stopped, the city would be irreparably harmed. ... These litigants will have due process. They will have their day in court" – bankruptcy court, Detroit attorney Heather Lennox said during two hours of arguments by the city, pension funds and unions.

Rhodes said Wednesday there is nothing in federal law or the US constitution that gives a state court a concurrent role in a bankruptcy.

The courtroom was jammed with lawyers representing some of the thousands of creditors as well as rank-and-file city employees and retirees eager to know the outcome. Some wore T-shirts that said "Detroit vs Everybody."

Detroit emergency manager Kevyn Orr, who recommended bankruptcy, sat in the front row. Outside the courthouse, protesters held a banner with a message for Wall Street: "Cancel Detroit's debt. The banks owe us."

There are three lawsuits in state courts challenging the bankruptcy. They mostly focus on a provision in the Michigan Constitution that says public pensions "shall not be diminished or impaired." Pensions have not been frozen or reduced in the bankruptcy so far, but officials say there are shortfalls in the funds and that payouts could be at risk.

Sharon Levine, an attorney for a union that represents city workers, urged Rhodes to let those lawsuits run their course. She said there's no federal insurance for public pensions once they're broken, unlike pensions at private employers.

"Our members who participate at most are at or below $19,000 a year. There is no safety net," Levine said.