Newt Gingrich earned between $1.6 million and $1.8 million as a consultant for the government-sponsored mortgage company Freddie Mac, far more than the $300,000 contract he disclosed in a recent debate, according to a Bloomberg News investigation.

Gingrich began working with Freddie Mac in 1999 with a contract that paid between $25,000 and $30,000 a month through 2002, Bloomberg reported. His next contract paid $600,000 over two years, and he continued to receive retainers through 2008.

During CNBC's Republican candidates' debate on Nov. 9, Gingrich was asked what he did for Freddie Mac to receive $300,000 in 2006, and he called himself a historian for the company. He claimed that he offered them advice on precisely what they didn't do and called its risky lending practices, which contributed to the 2008 subprime mortgage crisis and led to a government takeover of the company, insane. He added at a campaign stop in Iowa this week that he did no lobbying of any kind.

But, while Freddie Mac officials confirmed to Bloomberg that Gingrich was not originally hired as a lobbyist, they said that in 2006, he was asked to build bridges to Capitol Hill Republicans in an effort to prevent Congress from privatizing the company. They also disputed his account of the advice he gave.

Gingrich Did Not Question Housing Bubble, CDO bundling

None of the former Freddie Mac officials who spoke on condition of anonymity said Gingrich raised the issue of the housing bubble or was critical of Freddie Mac's business model, Bloomberg reported.

In the lead-up to the 2008 financial crisis, Freddie Mac and another government-sponsored mortgage company, Fannie Mae, offered mortgages to people who were at a high risk of default and then packaged those mortgages and sold them to investors as collateralized debt obligations, or CDOs. That worked as long as housing prices kept rising, but when prices started to fall, borrowers started to default, leading to a flood of home foreclosures and major losses for the CDO investors.

Since his consulting contract ended, Gingrich has been very vocal in criticizing Freddie Mac and Fannie Mae, which he said are so thoroughly politicized and preside over such irresponsible lending policies that they need to be replaced with smaller, private companies operating without government guarantees, whose leaders focus on making a profit, not manipulating politicians.

Freddie Mac: Gingrich Paid to Argue Against Privatizing Giant

But according to Freddie Mac officials, Gingrich was paid to argue against privatizing the company, developing an argument on behalf of the company's public-private structure that would resonate with conservatives seeking to dismantle it.

R.C. Hammond, a spokesman for Gingrich's campaign, told Bloomberg, We dispute your sources' account. He confirmed that Gingrich did have a series of contracts with Freddie Mac over a period of many years, during which he was paid to give strategic advice.

Interestingly, in a debate on Oct. 11, Gingrich pinned the blame for the housing crisis on Democrats and specifically on U.S. Rep. Barney Frank of Massachusetts, the chairman of the House Financial Services Committee. Go back and look at the lobbyists he was close to at Freddie Mac, he said.

But it is now clear that Gingrich was close to lobbyists at Freddie Mac, too -- so close, they paid him more than $1.6 million for his services.