The federal government plans to relocate the National Science Foundation from Ballston to the Eisenhower Avenue area of Alexandria in 2017, in what would be one of the largest transfers of federal workers in Northern Virginia since the Patent and Trademark Office departed Crystal City for Alexandria in 2005.

The NSF, an independent agency that funds a wide array of science and engineering research, is among the largest employers in Arlington, with more than 2,100 headquarters employees, contractors and scientists.

After a competitive search, the General Services Administration announced Friday that it had selected the developers of Hoffman Town Center, a 56-acre development just inside the Capital Beltway, for a 15-year headquarters lease for the NSF.

The new 660,848-square-foot headquarters is to be built on parking lots next to the AMC Hoffman Center 22 movie theater, a short walk from the Eisenhower Avenue Metro station. Eventually the developer, a unit of Hoffman Development, plans 7 million square feet of offices, apartments, hotel rooms and retail.

The deal was highly sought after by Alexandria, Arlington and other jurisdictions not only because of the NSF’s high-level staff, but because the agency draws more than 60,000 visitors every year, many of them serving on scientific review panels. The foundation had a $7 billion fiscal 2012 budget.

Alexandria Mayor William D. Euille (D) called the move “a tremendous gain for our community.” He said he thought the deciding factors in the city’s favor were “access to Metro, and multiple stations, walk-ability to Old Town and the old historic district, and the quality of life in Alexandria.”

But Alexandria also aggressively subsidized the deal to ensure that either Hoffman Town Center or another property nearby, Carlyle Plaza, presented the best deal for the federal government. The city offered Hoffman a $23 million tax abatement, which officials expect to net an additional $50 million in taxes from the NSF buildings and the properties around them. Alexandria plans a new “Eisenhower Avenue Science Redevelopment District.”

Over the course of the 15-year lease, the GSA — which has been pressuring agencies to cut real estate costs — expects to save about $65 million on rent. It will receive an additional $35 million from the developer to reduce moving and operational costs caused by the relocation.

The NSF will remain in Arlington at 4121 and 4201 Wilson Blvd. in the Stafford Place complex until the move. Acting director Cora B. Marrett informed employees of the decision Friday. An agency spokeswoman referred questions to the GSA.

Arlington officials, some of them still smarting from the Patent and Trademark Office’s departure, raised questions about whether the GSA was really making the most cost-effective choice for the agency. In Ballston, the NSF enjoys proximity to the Defense Advanced Research Projects Agency (DARPA), another major science funder.

Arlington County Manager Barbara Donnellan wrote a letter June 5 to Dan Tangherlini, acting administrator of the GSA, asking the agency to continue negotiations.

“We are confident, given the massive direct and indirect costs of relocation, as well as the significant federal real estate investments already made over the last decade in the vibrant science and technology research cluster that has been created around NSF, that the stay-in-place option provides the lowest cost and highest value option for the federal government,” she wrote.

In an interview, Donnellan and Jay Fisette (D), vice chairman of the Arlington County Board, acknowledged that they also provided incentives but said the Alexandria subsidy package might have gone too far.

“From my knowledge of it, this almost looks like a giveaway of Alexandria taxpayers’ money,” Fisette said. “If local governments are going to give away taxpayer money to attract an organization from another community, that’s a whole other ballgame.”