“I agreed to do it because I think it is a real privilege to lead an organization that plays as critical a role as Fannie Mae does,” said Timothy Mayopoulos, new CEO. (Joshua Roberts/BLOOMBERG)

Government-backed mortgage giant Fannie Mae on Tuesday announced that it had tapped Timothy J. Mayopoulos, the firm’s general counsel and chief administrative officer, as its new chief executive.

For Mayopoulos, a 53-year-old former Bank of America executive who joined Fannie Mae in 2009, the promotion comes with an odd twist: a significant pay cut.

Beginning in January, Mayopoulos will get an annual salary of $600,000, part of a promise made on behalf of the company’s federal regulator to scale back executive pay at taxpayer-funded firms. But the Federal Housing Finance Agency, which oversees Fannie Mae and its companion firm Freddie Mac, will allow him to receive the remainder of his 2012 compensation package, valued at $2.66 million.

“I agreed to do it because I think it is a real privilege to lead an organization that plays as critical a role as Fannie Mae does,” Mayopoulos said in an interview Tuesday afternoon.

Together, Fannie and Freddie own or guarantee a majority of home loans in the United States and have long been a key source of funding for the mortgage market. Their portfolios amount to about $5 trillion in assets.

Mayopoulos acknowledged the uncertain future of the firms, which combined have received more than $187 billion in taxpayer aid and which many lawmakers have advocated winding down. But he said one of his priorities will be helping to shape that future in constructive ways.

“We understand that policymakers are ultimately going to determine what happens to Fannie Mae and Freddie Mac,” Mayopoulos said. “But what we’re focused on for the next few years is helping policymakers and FHFA lay the foundation for a new housing finance system. . . . Clearly the country deserves a better housing finance system than it has had in the past.”

Mayopoulos succeeds Michael J. Williams, who in January announced his intention to step down. The appointment comes a month after Freddie Mac also hired a new chief executive — 62-year-old Donald Layton, a longtime J.P. Morgan Chase executive.

Like Layton, Mayopoulos has a long history in the financial sector. He held management roles at Deutsche Bank and Credit Suisse First Boston and served as general counsel at Bank of America until being forced out in late 2008.

According to a recently filed shareholder lawsuit that became the focus of a New York Times story this week, Bank of America executives withheld from shareholders key information about losses that could result from the $50 billion purchase of Merrill Lynch in late 2008.

In testimony cited in the lawsuit, Mayopoulos said that he had been surprised by the size of the losses within Merrill and that he had tried to speak to Bank of America’s chief financial officer about publicly disclosing the extent of the problems. According to the testimony, he was fired with no explanation and escorted from the property. Mayopoulos declined to comment on the episode Tuesday.

During his three years at Fannie Mae, he has helped oversee everything from communications and marketing to government relations and long-term planning. The company said Tuesday afternoon that its board approved Mayopoulos’s appointment after “an extensive search involving internal and external candidates.”

“His deep understanding of the unique challenges Fannie Mae is facing and his effective working relationships with our regulator, management, the board, and external partners will serve the company and the industry well,” Fannie Mae Chairman Philip Laskawy said in a statement, calling Mayopoulos an “experienced and effective leader.”

In a separate statement, the Federal Housing Finance Agency’s acting director, Edward J. DeMarco, also praised the decision. “Tim brings a breadth of knowledge and experience in housing finance and financial services that is vital at this important time for Fannie Mae and the nation’s housing finance system,” he said.

Mayopoulos takes over Fannie Mae a few weeks after the firm reported a $2.7 billion profit during the first quarter of 2012 and said it would not require additional taxpayer aid for the first time since the government seized it in 2008. Those positive numbers came largely because of improvements in the housing market.