(Adds details on latest results, background)
July 31 (Reuters) - Freddie Mac said on Tuesday its comprehensive income rose to $2.435 billion in the second quarter from $1.986 billion a year earlier as gains on derivatives offset a decline in its net interest income.
The U.S. mortgage finance agency said it will pay a $1.6 billion dividend to the U.S. Treasury after making no payment in the prior quarter as it sought to build a $3 billion capital cushion due to the sweeping overhaul of the U.S. tax code enacted last December.
The earnings increase came even as the domestic housing market is struggling to keep pace with the overall economy. Analysts have blamed expensive homes, land shortages and rising loan costs for the drag on home sales.
"On the financial side, we produced strong earnings with a growing track record of quarterly stability," Freddie Mac Chief Executive Donald Layton said in a statement.
Freddie and its larger sibling Fannie Mae make money by charging fees to guarantee home loans made by banks and other lenders. They also earn income from investing in mortgage and related securities.
In 2008, the government took control of Freddie and Fannie in a $187 billion bailout during the global credit crisis after they were exposed to soured subprime mortgages. The two agencies have handed over their profits to the Treasury and have shrunk their investment portfolios under the terms of the conservatorship.
In the latest quarter, the McLean, Virginia-based company booked $416 million in derivative gains, compared with a $1.096 billion loss in the same quarter a year ago.
This helped offset a decline in interest income to $3.003 billion in the second quarter from $3.379 billion a year ago.
Outside of its operations, Freddie Mac said it booked $264 million in an after-tax gain from a final judgment against Nomura Holding America Inc, a unit of Nomura Holdings Inc , in a case involving its sale of private label mortgage-backed securities to Freddie Mac.
Reporting by Richard Leong; Editing by David Gregorio and Susan Thomas