In the first few minutes of Monday's presidential debate between Donald Trump and Hillary Clinton, the two got into a back and forth about trade. Specifically, how Clinton feels about some of the free trade deals her husband has signed or she has advocated for. The truth is, her relationship with trade is complicated. Last June, I went line by line into her various positions on free trade deals. Here's what I found then:

Clinton has been up close and personal for two presidents as they tried to sign two major free trade deals. And she has had a long and somewhat complicated relationship with whether to support them.

Here's a brief history of how Clinton's many jobs have shaped her positions on trade.

First Lady Clinton was meh on NAFTA

Let's start when her husband was president.

In the  1990s, President Bill Clinton decided to pick up where George H.W. Bush left off and close a major free trade deal with Canada and Mexico. The North American Free Trade Agreement was signed into law in 1993, but First Lady Hillary Clinton was not as supportive of it as her husband, Clinton aides told the Washington Post's David Nakamura.

But Clinton didn't disown her husband's landmark pact. In fact, she defended NAFTA to labor unions.

"The simple fact is, nations with free-market systems do better,' Clinton said in a 1997 speech, according to a 2007 Bloomberg article.

Sen. Clinton was kind of OK with some free trade

When Clinton represented New York in the U.S. Senate from 2001 to 2009, there weren't many big trade deals that came her way to vote on. But she did vote for lots of little ones, saying on the Senate floor in 2005:

During my tenure as senator, I have voted for every trade agreement that has come before the Senate, and I believe that properly negotiated trade agreements can increase living standards and foster openness and economic development for all parties.

Then she promptly voted against President George W. Bush's Central American Free Trade Agreement: The harm outweighed the good, Clinton said, because it didn't protect Americans who might lose their jobs.

CAFTA passed the Senate 54-45 and was eventually signed into law.

Candidate Clinton was not a fan of free trade

A decade later, candidate Clinton was battling with candidate Barack Obama to win labor union-friendly Ohio in the 2008 Democratic presidential primary.

Clinton said in a 2007 CNN debate that NAFTA had been a mistake "to the extent that it did not deliver on what we had hoped it would."

Obama then accused Clinton of flip-flopping on NAFTA since her days in the White House -- an accusation Politifact rated as "true:"

We won't say Clinton was a huge cheerleader for NAFTA, but she did speak favorably of it. And now she says it needs to be fixed. Was running for president the cause of this switch, or was it a gradual change of thinking? It's hard to say; the balance of evidence does not point to a harsh pivot point.

(We should note candidate Obama also criticized free trade agreements -- the same things he's trying to push his final months in office. He campaigned on renegotiating NAFTA and tried to hit Clinton hard on her relationship to the deal. "I want to be very clear: I don't think NAFTA has been good for America, and I never have," Obama said in Ohio in 2008.)

Clinton ended up taking Ohio, but only after a string of losses to Obama. And her campaign was already pretty much over.

Secretary of State Clinton was big on free trade

The campaign ended, and Obama asked Clinton to be his secretary of state. This was when Clinton seemed to embrace free trade the most in her career.

Clinton wanted to make a mark in her new job, and she and Obama saw an opportunity to do just that by growing the United States' influence in Asia.

Enter the TPP.

Clinton wasn't involved in the day-to-day negotiations of the massive, 12-nation deal, Nakamura reported. But she did promote it around the world while selling the administration's focus on Asia. Her first official trip as secretary of state was to Japan, Indonesia, South Korea and China. In 2011, she wrote a 5,600-word cover story for Foreign Policy announcing America's "pivot" to Asia.

That year, she visited Hong Kong and championed the TPP.

From Nakamura:

The goal of the Trans-Pacific Partnership, she explained, was to “create a new high standard for multilateral free trade,” a pact that would cement the United States’ standing in the world’s fastest-growing region.

Finally, in November 2012, Clinton visited Australia and made what would become her defining statement on TPP: That it was "the gold standard in trade agreements."

Clinton left her job in February 2013, with the general framework of TPP in place. But then she switched back to being candidate Clinton -- unencumbered by pitching free trade deals for her husband or Obama -- and the rest is history.

This post has been updated to reflect Clinton's views on trade while in the Senate.