Prompted by expiring leases at two of its Washington buildings, Fannie Mae plans to sell its headquarters and consolidate employees to a single location in D.C., the organization announced Thursday.

Fannie Mae owns its headquarters at 3900 Wisconsin Ave. and two others buildings nearby. Fannie Mae spokesman Pete Bakel said the decision to sell the organization’s real estate stemmed from two leases that will expire in coming years, deteriorating conditions in the headquarters building and the opportunity to consolidate employees from five locations into one.

In addition to 3900 Wisconsin Ave., the brick complex across from Sidwell Friends School, Fannie Mae owns 4250 Connecticut Ave. and 3939 Wisconsin Ave. All those buildings will go on the market, Bakel said. Fannie has leases that are set to expire at 4000 and 2115 Wisconsin Ave.

“In the next two to three years, we plan to consolidate Fannie Mae staff from five Washington, D.C. area offices into a single, leased office building located in downtown D.C.,” Bakel said in a statement. “This move comes ahead of the expiration of two leases on buildings that house many of our employees in the District. While an exact location has not been determined, we are focused on making responsible real estate decisions to ensure the wise use of resources, the safety and soundness of operations, and flexibility to adapt to changes in our future workplace needs.”

Last year, as Congress debated dissolving both Fannie Mae and Freddie Mac, speculation mounted that the organizations’ real estate may go up for sale. Bakel said in an interview that the decision had nothing to do with the debate about possible changes to the nation’s housing finance system.

“At this point in time we’re moving forward to help build a better system for the future,” Bakel said. “So we are just trying to improve everything about our business, including infrastructure, and part of that infrastructure is the housing of our operations.”

He said possible reform by Congress, “doesn’t play into our planning because we can’t predict the future. I don’t think anybody does.”

In all, Fannie Mae employs 2,800 in the District, about 40 percent of the company’s workforce. The move could happen in 2016 or 2017.

Follow Jonathan O’Connell on Twitter: @oconnellpostbiz