Correction: A previous version of this article misstated where the District would get the funds it plans to use to cover some charter-school facilities costs. In the plan announced by Mayor Vincent C. Gray, that money will come from operating dollars left unspent at the end of the 2012 fiscal year, not from a portion of the District’s $140 million budget surplus. This version has been corrected.

The District has agreed to pay for charter-school facilities costs that are currently paid for with federal funds, Mayor Vincent C. Gray announced Thursday.

The $7 million move will free up those federal dollars, essentially turning them over to the charter sector to use for other needs.

“Ensuring that all D.C. public school students have access to a high-quality education has been a top priority of my administration,” Gray (D) said in a statement. “Part of this commitment is ensuring that the learning environment for our students is stimulating and conducive to academic achievement.”

The $7 million comes from money in the operating budget left unspent at the end of the 2012 fiscal year, which ended last month. It is not part of the city’s $140 million budget surplus.

Charter schools are publicly funded but independently operated. They enroll an increasing proportion of the city’s students — about 43 percent, according to the most recent projections — but are not included in the city’s capital budget and must find and secure their own real estate.

They receive $3,000 per student to help pay for leases and mortgages on school buildings. Most of that facilities allowance has come from city tax dollars in recent years, but some of it — $200 per child — has been paid with federal funds.

There was some uncertainty about whether the U.S. Department of Education would allow the city to continue using those funds, meant to improve school quality, for facilities. Gray’s announcement ensures that the full amount of the facilities allowance will be funded with city dollars, not just this year but also into the future.

“It’s great news for charter school quality,” said Scott Pearson, executive director of the D.C. Public Charter School Board. “A lot of schools have bond obligations and debt obligations, so knowing that these funds are going to be there, year in and year out, is very important to their creditworthiness.”

Ultimately, the District’s Office of the State Superintendent of Education and the U.S. Department of Education will work with charter leaders to determine how the $7 million will be spent. Pearson said it could go to charter schools in the form of grants for specific efforts to boost quality, such as improving instruction or special-education services.

Gray’s announcement does not change the fact that charters receive less public funding for buildings than schools in the traditional public school system, something that has long drawn complaints from charter leaders.

The District this year is spending nearly $6,000 per student for construction and renovation of D.C. Public Schools buildings.