NEW YORK ( TheStreet) -- Fannie Mae ( FNMA) on Thursday announced second quarter earnings of $10.1 billion, and said it would pay the government a dividend of $10.2 billion in September. This was Fannie Mae's sixth-consecutive quarter of profits. The second-quarter results nearly doubled the $5.1 billion the company earned during the second quarter of 2012. Fannie's common shares were up 1% in premarket trading, to $1.56. Fannie Mae and its sister mortgage giant Freddie Mac ( FMCC) were taken under government conservatorship in September 2008. Under the modified terms of the bailout agreement, the two companies -- known as the government-sponsored enterprises, or GSEs -- must pay all profits to the U.S. Treasury, save minimal capital buffers of $3 billion for each company. The companies stopped taking draws from the Treasury during the second quarter of 2012. Freddie Mac ( FMCC) on Wednesday announced second-quarter earnings of $5.0 billion, increasing from $4.6 billion the previous quarter. Freddie also announced it would pay the U.S. Treasury a dividend of $4.4 billion in September. The government's senior preferred stake in Fannie Mae totals $117.1 billion, and following the September payment, the company will have paid the Treasury cash dividends totaling $105 billion. The government has a $72.3 billion senior preferred stake in Freddie Mac, and once Freddie's September dividend is paid, the company's dividend payments to the Treasury will total about $41 billion. Under their modified bailout agreement, neither Freddie Mac nor Fannie Mae are allowed to repurchase any of the government-held preferred shares, no matter how profitable the GSEs become and no matter how much in dividends they pay the government. Private investors have challenged the modified bailout agreement through a series of lawsuits with the hope of recapturing some value. One possibility -- which still seems remote -- is for the government's preferred stake to be converted to common shares, as was successfully done as part of the epic bailout of American International Group ( AIG). That bailout resulted in a profit to U.S. taxpayers of $22.7 billion, according to the Treasury. President Obama in a speech on Tuesday called for the wind-down of Fannie Mae and Freddie Mac, while still providing a limited government backing for mortgage loan securitization. This is essentially the approach favored by senators Mark Warner (D. Va.) and Bob Corker (R., Tenn.). The senators in June introduced legislation to wind-down Fannie and Freddie over five years, privatize most of the U.S. mortgage market, while putting in place a limited government backstop in the form of a "Federal Mortgage Insurance Corporation (FMIC), modeled in part after the FDIC." The Federal Deposit Insurance Corp. insures bank deposits by charging premiums to all U.S. banks and savings and loan associations.