The Maine Army National Guard and the University of New England have finalized a land swap that gives UNE an armory building on Stevens Avenue in Portland and allows the Guard to build a new maintenance facility and readiness center in Saco.

In the works for years, the deal gives UNE valuable land on its already tightly packed campus, which is hemmed in on all sides by residences, Evergreen Cemetery and streets.

University officials said they have no immediate plans to use the 65,000-square-foot brick armory building, which sits on nine acres.

The university worked to locate a property that would satisfy the complex set of criteria the Guard provided, and ultimately paid $1.35 million for the 29 acres in Saco, said Bill Bola, vice president of operations for UNE. The Armory property, meanwhile, was appraised at $1.17 million.

The Guard will use the 29 acres of land in Saco to build a $17 million maintenance facility and readiness center for the 262nd Engineer Company,whose units and equipment are now dispersed at locations in Belfast and Westbrook, said Col. Dwaine Drummond.

Earlier plans by the Guard focused on the same parcel of land, but with a contiguous section in Scarborough. Drummond said the Scarborough portion would have had to be rezoned. When the Guard met resistance at the town level, Drummond said he decided to drop the Scarborough portion in favor of adding more acreage on the Saco side, where the zoning did not require a change.

Drummond said Congress has approved the money for the facility, but it is not scheduled to be disbursed until fiscal year 2018, meaning construction is at least two to three years away.

In the meantime, some Guard equipment and maintenance operations will remain on Stevens Avenue.

“This is a deal that has been in the works for a number of years, and I credit both the Guard and the team at UNE with working through the process to come to a mutually beneficial agreement. It’s a win-win,” UNE President Danielle Ripich said in a statement.

Brig. Gen. Gerard Bolduc, acting adjutant general for the Maine National Guard, similarly praised the deal.

“The land swap will allow us the ability to create a state-of-the-art facility to serve the great citizens of Maine,” he said. “The additional acreage in Saco allows for potential expansion and greater onsite training for our soldiers. The location will provide safer access for our vehicles and equipment.”

Although the land swap has been finalized, it will take several months at least for the Guard to move out of the Stevens Avenue facility. Bola did not know when the transition will be complete.