Internal emails show that the Clinton campaign knew that the former secretary of state’s change of heart on the Trans-Pacific Partnership was “a huge flip flop.”

“She has to be for TPP,” Ron Klain, Clinton’s campaign debate coach, wrote in an Oct. 3, 2015 email to Robby Mook and Jake Sullivan, Clinton’s campaign manager and top policy adviser, respectively.

“She called it the ‘gold standard’ of trade agreements. I think opposing that would be a huge flip flop,” added Klain, a former chief of staff to Vice President Joe Biden.

As secretary of state, Clinton strongly supported the Obama-backed TPP, which is a trade deal involving 12 nations.

She also praised TPP during closed-door speeches after leaving the State Department. But Clinton came out against it on Oct. 7 after facing intense pressure from labor unions, grassroots Democratic voters and Vermont Sen. Bernie Sanders to oppose the trade deal.

The emails, which were hacked from the Gmail account of Clinton campaign chairman John Podesta and released by Wikileaks, suggest that Clinton’s flip flop was a purely political maneuver rather than an expression of belief in the merits of opposing the trade compact.

“TPP would be lethal with labor. We’d loose afscme and likely seiu as well,” Robby Mook wrote to Klain, referring to the American Federation of State, County and Municipal Employees and Service Employee International Union.

The two major labor unions endorsed Clinton after she came out against TPP.

Klain offered suggestions for how Clinton could massage the glaring switcheroo.

“She can say that as President she would work to change it. She can say that it can be better. But I think she should support it,” he wrote.

“I agree with you on TPP but others (including on this email!) feel strongly to the contrary,” Sullivan wrote to Klain in the email exchange.

In July, Virginia Gov. Terry McAuliffe, a longtime Clinton ally, rocked the boat when he said that Clinton would end up supporting TPP if elected president.

The campaign scrambled to bat down the claim.

“Love Gov. McAuliffe, but he got this one flat wrong. Hillary opposes TPP BEFORE and AFTER the election. Period. Full stop,” Podesta responded in a tweet.

Follow Chuck on Twitter