Correction: An earlier version of this story incorrectly stated the year AEI was founded. This version has been corrected.

The five-story building at 1785 Massachusetts Ave. NW once served as a luxury apartment building for the likes of then Treasury Secretary Andrew W. Mellon. (Courtesy of National Trust for Historic Preservation )

The National Trust for Historic Preservation is selling its Dupont Circle home of 35 years to the American Enterprise Institute, a think tank that will turn the building into its new headquarters.

The trust — a private nonprofit organization whose mission is to protect historical buildings — bought 1785 Massachusetts Ave. NW in 1977, renovated it and moved in two years later. Built in 1917, the five-story building once served as a luxury apartment building for the likes of then Treasury Secretary Andrew W. Mellon.

As one of the city’s most prominent example of beaux arts architecture, it was an appropriate home for an organization that works around the country to save buildings like it from demolition.

But the National Trust, under a strategic plan it completed two years ago, is moving to provide more direct engagement across the country, requiring a smaller presence in Washington. “As a result, the amount of space that we require in the Washington field office is reduced,” said Rebecca Morgan, a spokeswoman for the National Trust. The organization has been leasing about 25 percent of the space to other organizations, she said.

AEI, which was founded in 1938 and advocates for right-leaning public policies, will move to the Dupont Circle building from 1150 17th St. NW, where it occupies the top three floors, but is in need of more space in which to grow.

“This is a vital step for AEI and our unyielding mission,” AEI President Arthur Brooks said in a statement. “Our growing community of world-class scholars and staff need a building equal to their talent. This property gives us an ideal facility to enhance our expanding programs. We’ll be excited to call it our new home.”

The statement was issued jointly by AEI and the National Trust. The organizations declined to share the sales price because the final details of the deal are still being finalized.

Stephanie K. Meeks, president of the National Trust, said in the statement that she was “pleased that after 30 years, we can convey stewardship of this extraordinary building to another organization that appreciates its historic importance.”

Before AEI moves into the Dupont building, National Trust needs to find a new home. Naturally, the group says it will be a historical building.