ST. PAUL, Minn. — The budget spat between Minnesota's Democratic Gov. Mark Dayton and Republican state lawmakers moved from the Capitol to a courtroom Thursday, with a judge warning that the stalemate threatens a state constitutional crisis with a government shutdown a week away.

Ramsey County Chief Judge Kathleen Gearin urged the two sides to keep trying to resolve their differences over raising taxes and cutting spending.

"It feels a little bit something almost like a game of chicken," Gearin said.

The failure to agree on a budget creates "far more sweeping a crisis and more significant an issue than ever before," Gearin said, calling it "a constitutional disagreement of extreme importance."

Most of Minnesota's state government functions would be suspended starting July 1 if the governor and Legislature don't enact a new two-year budget. It would be the state's second shutdown in six years, and the closure would be far more extensive than the partial shutdown in 2005.

Budget talks have stagnated for weeks. Dayton wants to raise new taxes while Republicans seek a definite ceiling on state spending. Gearin denied Dayton's request to order the talks into mediation, and ruled against four GOP senators who argued that court involvement in the budget process would violate the constitutional separation of powers.

Gearin is charged with sorting out conflicting views between Dayton and his fellow Democrat, Attorney General Lori Swanson, over how to determine which state services are critical to preserving public health and safety and should be continued during a shutdown.

Swanson is asking that the court appoint a retired judge as referee empowered with making those decisions. "We ask you and this court to step in and protect the constitutional rights of the people of Minnesota," Swanson said.

But Dayton's attorney David Lillehaug said that would be an unconstitutional step for the courts and that only the governor can decide what state funding would continue in a shutdown.

"If July 1 arrives, and there is no state appropriation, the governor will take action," Lillehaug said. "He will not allow the prisons to be opened. He will not allow sex offenders to be released from supervision. He will not allow the State Patrol to be pulled over to the side of the road. He will not allow veterans homes to close."

Gearin also heard appeals from a parade of attorneys representing interests ranging from subsidized health care patients to highway contracts to local government officials to keep money flowing to their groups during a shutdown.

Hennepin County Attorney Mike Freeman argued that his county, the state's largest, needs the $1 million a day in federal Medicaid dollars that get passed through the state for hospitals and medical programs.

"We need word from this court that in a shutdown, they will continue," he said.

Former Attorney General Mike Hatch spoke about a 24-year-old Medicaid patient named Jenny Taylor, who got notice last week with almost 600,000 others that a shutdown could interrupt state-subsidized health care coverage.

"She is the face of what government is about," Hatch said. "Jenny is what we are talking about here today."

As the pleas wore on, Gearin showed frustration.

"At some point, people have to realize it's not the court's role to make everything better," she said.

Gearin repeatedly warned of the danger of the court intervening in a budget process the constitution reserves for the executive and legislative branches. The judge said the legal proceedings that would spring forth from a shutdown would present a "complex conundrum" and compared the likely fallout to the Charles Dickens novel "Bleak House," the dark tale of a lawsuit that lasted for decades.

She implored attorneys for Dayton and the House and Senate to urge their bosses to dedicate themselves anew to settling the budget dispute before July 1.

"The people want them to keep talking," Gearin said. "Please, keep talking."

Still, she quickly declined Dayton's request to appoint a mediator to help him and Republicans reach a budget deal. Gearin said she concluded that the executive and legislative branches have the "institutional competency" to resolve the standoff.

As the court hearing unfolded, however, the two sides still bickered a few blocks away at the Capitol – over whether negotiations tentatively scheduled for Friday and Saturday would include the leaders of Democratic legislative minorities.

Gearin said she probably wouldn't rule until next week on Swanson's request for a shutdown referee. "It would be far better if this were resolved by the legislative and executive branches getting together," she said.