Former President Bill Clinton raked in millions of dollars from special interest groups in the weeks just before and after his wife announced her presidential campaign, including $325,000 from a group that pushed for the Trans-Pacific Partnership.

Hillary Clinton came out against the trade deal in October under pressure from her rival, Bernie Sanders, and his progressive supporters. Sanders denounced the agreement early in his campaign, arguing the deal benefits major corporations at the expense of American jobs.

But the National Association of Manufacturers, which paid Bill Clinton a hefty fee just one month before Hillary Clinton launched her candidacy in April, lobbied for the Trans-Pacific Partnership, according to the Center for Responsive Politics.

The manufacturing business group endorsed the controversial trade agreement three months before turning to Bill Clinton, calling the deal "a significant improvement over the status quo" for corporations.

The former president also took in $300,000 from Oracle Corporation after his wife entered the Democratic primary. Oracle, an international technology firm, lobbied even harder for the trade agreement, disclosure forms show.

Hillary Clinton gave six paid speeches in the three months of 2015 before launching her campaign. She has defended her acceptance of huge speaking fees, which became a lightning rod for criticism on the trail, by arguing she was not thinking of running for president when she delivered the speeches.

However, the former secretary of state gave her final paid speech, for which she earned $260,000, less than a month before she officially kicked off her campaign.

Hillary Clinton once called the Trans-Pacific Partnership the "gold standard" of free trade and previously indicated she would support the deal before she became a presidential candidate.