Image caption Protesters demonstrate against Detroit's bankruptcy outside the federal courthouse

A federal judge is hearing arguments over whether Detroit city should be granted protection from its creditors.

In opening remarks, Bruce Bennett, the lead attorney for Detroit, said there was a "mountain of evidence showing the insolvency of the city".

But representatives for the city's unions and pension funds disagree and say the city is solvent.

With $18bn (£11bn) of liabilities, Detroit's case is the biggest municipal bankruptcy filing in US history.

The case to determine whether or not Detroit can continue with its bankruptcy filing is expected to last anywhere from five to 10 days.

Hands off

Analysis: No precedent Michelle Wilde Anderson is law professor at UC Berkeley and an expert in municipal bankruptcy filings. She says Detroit's case is made much harder because the laws governing municipal bankruptcies are murky. "The law is unclear on eligibility or it's just unformed," she says. Right now, the only contemporary precedent is the bankruptcy filing of Vallejo, California, which is significantly smaller than Detroit. That is why other cities in financial distress - of which there are many in the US - are watching what goes on in Detroit. "The cities are watching to understand what makes a city eligible for bankruptcy under the federal law," she says. She says it is not even clear how much cities have to cut services before they are eligible for bankruptcy. It is also unclear if bankruptcy filing is even a good idea - only about half of US states even allow cities to declare themselves broke.

In opening testimony, Jennifer Green, a lawyer for the Detroit pension fund boards, argued that the city and the state of Michigan had always planned to file for bankruptcy - despite earlier assurances in 2013 that newly appointed emergency manager Kevyn Orr would be evaluating all options.

As part of the bankruptcy hearing, the unions and pension funds are trying to prove that the city did not negotiate with them "in good faith".

If Steven Rhodes, the bankruptcy judge overseeing the case, agrees with them, the city would have to go back to the drawing board.

Protesters outside the court in particular singled out Mr Orr, chanting, "Down with Orr" and "Orr no more".

The appointment of Mr Orr, who is scheduled to testify on Monday, was controversial as it was done without voter support.

Unions and pension funds won a small victory when it was ruled that Michigan governor Rick Snyder would have to testify on Friday.

Furthermore, lawyers for the city admitted that plans to sell some works from the Detroit Institute of Arts might have to be shelved unless there is a leadership change at the museum.

Current director Graham Beal has said the plan is "abhorrent" and has vowed to fight any efforts to sell the museum's artworks, which include major works by Henri Matisse and Vincent van Gogh.

Ballooning debt

Media playback is unsupported on your device Media caption Erma and Gordon MacDonald: "If they take my pension away, then we'll be in bad shape"

However, many experts still believe that the judge will eventually rule in Detroit's favour.

City managers say bankruptcy is the only way to manage Detroit's debts and liabilities.

Half of the city's liabilities result from payments to retired staff, which includes healthcare and pension obligations.

In May, Mr Orr presented a report on Detroit's financial situation.

It said Detroit's expenditures had exceeded revenues by an average of $100m each year from 2008 to 2012.

Detroit has seen a dramatic decline in economic activity and population, as the big car makers - once the city's main source of employment - shifted production to cheaper locations in the US and overseas.

The city is now home to about 700,000 residents, down from the peak of 1.8 million in 1950.

There are almost 150,000 vacant and abandoned plots in the city according to the Detroit Future City report.