Buena Vista School District Superintendent Deborah Hunter-Harvill, left, speaks during a Buena Vista School District Board of Education meeting on May 9. (Colleen Harrison/Associated Press)

A week-long shutdown of public schools in Buena Vista, Mich., appears to be ending after state officials agreed Wednesday to send state dollars to the bankrupt school system so children can return to class and finish the school year.

The standoff dissolved when state officials accepted the school system’s plan to eliminate its debt, a key condition for releasing state dollars.

“I encourage the local school board, administration, and staff to get the schools open as soon as possible for the students,” Mike Flanagan, the state school superintendent, said in a statement.

The school board president, Randy L. Jackson, said some students might be able to return to classrooms as soon as Friday. It is unclear if the school year will be extended to make up the days lost since the school system shut May 6.

With six weeks remaining on the school calendar, the tiny, low-performing district near Saginaw ran out of money and abruptly closed its doors last week, cutting loose about 400 students from kindergarten through high school.

The school district asked the state for a bailout, but Michigan officials initially declined, citing legal obstacles. Teachers offered to work without pay to keep the schools open, but the school board refused, offering its own legal reasons. Meetings were held in the small community and at the state capital. Parents fumed.

“Get our kids to school,” Emmitt Jones, the father of a ninth-grader, told the school board at a special meeting Tuesday evening.

Deborah Hunter-Harvill, the superintendent, proposed using federal and state funds to pay for a “skills camp” that children from grades one through 11 could voluntarily attend four days a week.

But Rep. Daniel Kildee (D-Mich.) said the children deserve more.

“My goal from the very beginning is just to get these kids back in school,” Kildee said. “Get these kids with their teacher, in their classroom, to finish the school year. Four hundred kids just can’t be left to fend for themselves and have the adults fail and kids pay the price.”

Such insolvency for a school district is rare: Of the nation’s 12,500 public school districts, about half a dozen run out of money in the middle of the school year, said Mike Griffith, an analyst at the Education Commission of the States. Griffith said some schools threaten to shut down early to get additional state funds; others close a week or two early.

“There have been cases, though, when school districts run out of money halfway through the school year because of mismanagement issues,” Griffith said. “A lot of times, they tend to be smaller districts that, for one reason or another, didn’t understand their problems, didn’t correctly set their budget or made no adjustments during the year.”

Although Buena Vista’s crisis might be partially self-inflicted — Kildee and others have accused the school board of mismanaging its finances — dozens of other school districts in Michigan also are teetering toward insolvency. State officials have identified nearly 50 school districts that are running deficits.

“The magnitude of some of these deficits seem insurmountable,” Carol Wolenberg, the deputy superintendent at the state department of education, wrote in a February memo warning about the growing problem.

Like Buena Vista, the Pontiac school system didn’t have enough money to meet its payroll this month. It got a loan from its intermediate school district and then state approval of its deficit-elimination plan, which allowed it to receive enough state funds to complete the school year.

The schools closure in Buena Vista raised legal questions about whether students are being denied their rights under state law. Michigan’s constitution requires the state to provide a system of free, public education.

Some of the trouble can be traced to 1994, when Michigan changed how it finances schools, Griffith said. The state awards a per-student payment to districts, which are not permitted to augment that with a levy on local taxpayers, Griffith said. If a student leaves the school district, the funding also disappears.

A drop in population, therefore, means shrinking revenue for schools, while costs — such as building operations and salaries — remain constant or even increase as economies of scale disappear.

A weak economy is Michigan’s other problem. While other states have been recovering from the Great Recession of 2008, Michigan is lagging and federal stimulus dollars have dried up.

In Buena Vista, one of the worst-performing districts in the state, trouble has been brewing for years. On 2012 state exams, no eighth-graders were proficient in math, reading or science. Enrollment has dropped from 760 students in 2011 to about 400 this school year, a 47 percent decrease. That has led to a corresponding plunge in state funding.

The federal government has pumped $2.5 million into the school district since 2010 to fund a plan to transform Buena Vista. The district also gets about $1.3 million each year in federal Title I funds, which are designed to help high-poverty schools.

But there is little evidence of progress, as measured by test scores.

At the same time, there are concerns about how the school district has managed its funds.

This spring, the state said it would withhold aid for April, May and June because Buena Vista took more than $400,000 in state money to educate about 90 students at the Wolverine Secure Treatment Center, an alternative school, after its contract with Wolverine had ended.

“I can’t tell you how sorry I am that that happened, but it happened before I got here,’’ said Hunter-Harvill, who became Buena Vista’s superintendent in August.

She declined to discuss the district’s finances, referring questions to the district’s attorney, who did not respond to requests for comment.

Jackson, the school board president, said he did not know what happened to the $400,000. “I’m going to definitely to find out,” he said. “I don’t know what happened to that money. I’m pretty disappointed in my administration. I need to find out why this money was touched. It was money that should not have been given to us in the first place.

Students have been spending the lost school days hanging around their houses and neighborhoods. Food-services officials told the school board that parents whose children are eligible for free school meals have expressed concerns that their children are going hungry.

“It hasn’t been easy. People are trying to make do,” said Barbara Weigandt, whose great-granddaughter, 5-year-old Nevaeh, has been home with a babysitter instead of attending kindergarten. “Some are upset with the school board, some are upset with the superintendent. People are angry.”

Jackson, a single father with four children in the schools, said the shutdown was stressful on his own family. “I had to find relatives that would care for them during the day and trying to keep them busy and out of trouble,” he said. “It’s been quite heart-wrenching, too, with them asking me, ‘Hey, Dad: When are we going back to school?’ ”

Kildee worked to get federal, state and district officials to open the high school cafeteria and provide free breakfasts and lunches starting Wednesday.

Buena Vista High School’s 25 seniors will be able to graduate June 4, despite the truncated school year, and the prom will go on as scheduled on May 30, the school board said.

Sara Wurfel, a spokeswoman for Michigan Gov. Rick Snyder (R), called Buena Vista a “really challenging, unfortunate situation, both financially and academically. Our first and foremost goal has been on making sure that the kids don’t suffer from the mistakes and financial management” of the adults. At the school board meeting Tuesday night, members backed the skills camp and agreed to submit the deficit-elimination plan to the state for approval.

State officials told Hunter-Harvill that they would release state aid to allow the district to complete this school year if the school board submitted an acceptable plan to eliminate its deficit, as required by law. And she said state officials also wanted the board to approve the “skills camp.”

The state appeared to be serious about resolving the problem only in recent days, after political pressure began to build, Jackson said. “With all the pressure put upon them, they started to open up doors,” he said.