Fannie Mae (OTC: FNMA), the largest government-controlled mortgage backer, reported its second consecutive quarterly profit for the first time in five years Wednesday, but its CEO said the company should cede business to private investors when the housing market finally recovers.

"We need to shrink," Timothy Mayopoulos, Fannie's new CEO, told CNBC on Wednesday. "Private capital is sitting on the sidelines," he added, but said it was unlikely that investors would return until home prices had a sustained increase.

Because of the weak economy, around 90 percent of the U.S. mortgage market is supported by Fannie, its sibling company Freddie Mac, and the Federal Housing Administration, all government-controlled entities. Fannie and Freddie don't issue mortgages themselves, but instead buy them from lenders, injecting more capital to encourage more lending.

Fannie Mae reported net income of $5.1 billion in the second quarter, up from a $2.89 billion loss in the year-earlier quarter. It is required to pay $2.9 billion dividend to the U.S. Treasury as part of the 2008 federal takeover agreement. The company has benefited from stronger mortgages purchased after 2008 and rising home prices.

But Mayopoulos, who was formerly the chief legal counsel of Fannie Mae before becoming CEO in June, said it was too early to declare a national housing recovery, and the company was not expecting a "huge improvement" in the near-term. "Prices have stabilized, but they could go up a little, they could go down a little in the coming months," he said on CNBC. Consumer confidence and unemployment are the major drivers of housing demand, he added, and both indicators have had mixed results in recent months.

Mayopoulos also said he was "comfortable" with the decision of Edward DeMarco, chief regulator of Fannie and Freddie, to reject principal mortgage reductions, a move that was criticized by Democrats and questioned by Treasury Secretary Timothy Geitner. "We believe we have the tools here at Fannie Mae to help homeowners," said Mayopoulos.

He said it was up to regulators and the new president to decide on the ultimate fate of Fannie. Last year, the Treasury Department and Department of Housing and Urban Development issued white paper that proposed three privatized mortgage systems with some levels of government support, which could form a model for the future. However, the implementation of a new system isn't likely until the backlog of subprime mortgages and foreclosures is cleared.

Shares of Fannie Mae rose 9.31 percent to 31.5 cents Wednesday afternoon.