Next fall, children who once crowded the halls and trailers at Bailey’s Elementary in Falls Church will be the first to enroll in a new, modern school, five-stories high, in a one-time commercial office building.

On Friday, the Fairfax County schools announced that the administration had purchased the property, located at 6245 Leesburg Pike near Seven Corners, for $9.37 million. The building is about 11 / 2miles from Bailey’s.

The purchase brings to a close a process that began last summer as a radical plan to acquire the office building and convert the structure into a school.

The effort came out of desperation. Bailey’s Elementary, with more than 1,300 students, has for years been known as one of Fairfax County’s most crowded schools and is currently 30 percent over capacity. Last summer, workers removed the library’s shelves and replaced them with desks for new class space. A faded asphalt hopscotch court was long ago covered by a “temporary” trailer — one of 19 — that has since become a permanent installation on campus.

The school administration wrangled for years with the county board of supervisors to find a solution for the growth problem. A proposal to turn a library adjacent to the school into an campus annex fizzled. Another proposal to construct an elementary school on the property of nearby Glasgow middle school never gained traction.

Out of options, the schools sought the 6245 Leesburg Pike building. When the building’s owners did not cooperate in negotiations with the school system, the administration move forward with plans to acquire the building through the controversial practice of eminent domain. The schools would seize the building if necessary, administration officials said, to address the severe overcrowding at Baileys. In the end, the schools agreed with the building’s owners on a price.

“I’m pleased that we have been able to purchase the building at 6245 Leesburg Pike through negotiations with the property owners without having to resort to other legal means,” school board chair Ilryong Moon (At Large) said in a statement.

The new school will only serve current Bailey’s students. The school will be divided by grades and split between the old building and the new building in September when the academic year begins.