Here’s the latest twist in the District’s tortured relationship with the federal government: D.C. officials so want independence from Congress — and have such different ideas about how to get it — that they have put the city on a path to a self-imposed government shutdown late this year.

It isn’t likely to happen, but the threat adds another layer of uncertainty at the start of Mayor Vincent C. Gray’s nine months as a lame duck.

D.C. Council Chairman Phil Mendelson (D) scripted the budget process this year based on a voter-approved law intended to give the city more fiscal autonomy from Congress. Gray (D) — and Congress — have said that the law isn’t valid and that the city should follow established practice in submitting its budget for congressional approval.

The differences seem esoteric. Does the council have 56 days to approve a budget and send it to the White House, as Gray contends? Or should the budget be treated like any other city legislation and submitted directly to Congress, as Mendelson believes?

On Friday, the simmering battle burst into public view with three letters to Mendelson warning of financial crisis. Gray said the city could be forced back into the control-board era, when a federally established panel oversaw its finances. The D.C. attorney general suggested that the mayor might have to sue the council in federal court. And the chief financial officer said city officials could find themselves unable to spend taxpayer funds legally after Oct. 1.

Mendelson urged calm, saying he thought that the mayor and council could work out a compromise. “Nobody is going to drive us off the cliff,” Mendelson said. “But the council is bound by the law that was . . . ratified by the voters.”

The measure, which Mendelson proposed and 83 percent of voters backed in a referendum last April, authorizes the city to spend its roughly $6.8 billion in annual local tax revenue without interference from Congress.

In January, the Government Accountability Office, Congress’s investigative arm, said that in holding the referendum, city officials exceeded their powers under the home rule charter approved by Congress in 1973. The charter treats the city budget for the most part like that of any federal agency. The city is required to submit its budget to the president, who sends it to Congress for approval.

Under the autonomy law, the budget would receive two votes, like any other city legislation, and it would take effect after a congressional review period unless the House and Senate voted to reject it and the president agreed.

D.C. Attorney General Irvin B. Nathan has been an opponent of the budget autonomy measure from the start and urged the city election board not to let it on the ballot. He repeated his criticism in an opinion released Friday.

But now Mendelson and the council have acquired a new adversary, the city’s recently installed chief financial officer, Jeffrey S. DeWitt. He said his legal staff, too, had determined that the measure has “no legal validity.”

The issue thrust DeWitt for the first time into the middle of a conflict between the mayor and council. In a statement, DeWitt said that he “fully supports” efforts to obtain budget autonomy but that he cannot legally pay city bills with a budget that does not conform to the Home Rule Act, which would effectively shut down D.C. government Oct. 1.

The council has had outside counsel review its position, and members believe that it would have a strong case if the budget was challenged in court.

In their letters Friday, Gray and Nathan said the council must speed up its final vote on the budget, planned for June, so Gray can send it to the president by late May. The city’s leading voting-rights advocates denounced the letters and said they appeared to have influenced DeWitt.

D.C. Vote’s executive director, Kimberly Perry, issued this statement: “The District’s Attorney General and Mayor are working to undermine the will of the people — and the budget law — rather than fighting for self-determination and defending our right to budget freedom that was won through the ballot box.”