DETROIT (AP) — Short of cash, Detroit was delaying payments to vendors and "operating on a razor's edge" weeks before it filed for bankruptcy protection, the head of the city's turnaround team testified Thursday.

Ken Buckfire, a Wall Street investment banker and Detroit-area native, gave the most detailed testimony so far on the second day of a trial that will determine whether the city can stay in bankruptcy court and eventually unsaddle $18 billion in debt.

Detroit must show it's broke and tried in good-faith to negotiate with creditors. Unions and pension funds with much money at stake claim the city didn't hold genuine talks and therefore the case should be thrown out.

Buckfire's firm, Miller Buckfire, got involved in Detroit's finances before the bankruptcy. He arrived in 2012 as the state of Michigan signed an agreement with the city to make certain changes in exchange for financial support. The deal fell apart and eventually led to the appointment of an emergency manager last March.

Buckfire said many city assets were considered for possible sale but none were viable, including a small airport — "effectively worth nothing" — and the water department, which he described as a "very complicated situation."

He said art is being appraised at the Detroit Institute of Arts, a museum that is operated on the city's behalf.

By last spring, there were estimates that Detroit soon would be down to just $7 million, a small vein of cash in an annual budget of more than $1 billion, while payments to vendors were repeatedly delayed, Buckfire said.

"The city was operating on a razor's edge of liquidity. ... There was nothing of significance that could be converted to cash to avert a cash crisis in June or July," he said.

Emergency manager Kevyn Orr, appointed by the Michigan governor to run Detroit, announced in June that the city would stop making payments on $2.5 billion in unsecured debt. The Chapter 9 bankruptcy filing came a month later.

Lawyers opposed to the bankruptcy asked that much of Buckfire's testimony be stricken. They said he offered too much opinion about finances that went beyond the scope of his role in Detroit.

"Part of our job here is to set forth the story of the decisions that were made and the reasons they were made," Detroit attorney Thomas Cullen Jr. told the judge. "This witness has done that. He was an operative figure in real time. ... It has to be admissible."

Judge Steven Rhodes said he would defer a decision until Friday.

Another witness, Charles Moore, a turnaround specialist from the Detroit-area firm Conway MacKenzie, talked about his experiences at City Hall.

"A number of departments were severely broken ... unable to perform basic functions," he said.

Moore said it would cost $500 million over six years to knock down blighted or abandoned buildings and improve vacant properties.

A decision on Detroit's eligibility appears to be weeks away. The trial could end next week, but the judge has set a Nov. 13 deadline for lawyers to file legal briefs on certain issues.