The race between Hillary Clinton and Bernie Sanders heated up this week after a rhetorical spat over who was or wasn’t qualified to be president.

It started when Clinton said Wednesday that Sanders "hadn’t done his homework and he’d been talking for more than a year about doing things that he obviously hadn’t really studied or understood."

Responding to a Washington Post article that cast Clinton’s comments as questioning his qualifications, Sanders shot back, saying Clinton is the one who’s unqualified, upsetting Clinton’s supporters and former president-husband.

The tiff leveled off Friday when Sanders took back his statement and said "of course" Clinton is qualified. But Sunday on Meet the Press, Sanders said his point all along was Clinton lacks good judgment.

"Well, when you vote for virtually every trade agreement that has cost the workers of this country millions of jobs," he said, "when you support and continue to support fracking, despite the crisis that we have in terms of clean water, and essentially, when you have a super PAC that is raising tens of millions of dollars from every special interest out there, including $15 million from Wall Street, the American people do not believe that that is the kind of president that we need to make the changes in America to protect the working families of this country."

There’s a lot to fact-check in this statement, but we were particularly curious about Sanders’ claim that Clinton supported "virtually every trade agreement."

Sanders is exaggerating slightly, but he has a point that Clinton has been largely in favor of free trade. His claim that these deals have cost the country "millions of jobs" is up for debate.

Clinton’s position on free trade

Unlike Sanders’ two decades of consistent opposition to free trade agreement, Clinton has zigzagged through the years.

"Some people are generally pro-trade or anti-trade. She’s case-by-case on trade," Gene Sperling, director of the National Economic Council in both the Clinton and Obama administrations, told the Washington Post last year.

As first lady, Clinton spoke favorably in the 1990s and in the early 2000s of the North American Free Trade Agreement, signed by President Bill Clinton.

"Creating a free trade zone in North America — the largest free trade zone in the world — would expand U.S. exports, create jobs and ensure that our economy was reaping the benefits, not the burdens, of globalization. Although unpopular with labor unions, expanding trade opportunities was an important administration goal," she wrote in her 2003 memoir, Living History.

As a senator from New York, Clinton had the opportunity to vote on 10 trade deals. She said yes to six and no to the Dominican Republic-Central America Free Trade Agreement (DR-CAFTA) and the deal with Andean countries. She skipped the votes on agreements with Jordan and Peru, which came up when she was running for president the first time, but supported both deals.

Clinton explained her seemingly inconsistent positions in a 2005 speech to Congress: "The U.S.-Jordan Free Trade Agreement included internationally recognized enforceable labor standards in the text of the agreement. Sadly, DR-CAFTA is a step backward."

While the deals with Chile, Australia and Singapore similarly excluded labor rights standards, Clinton said she "supported these agreements despite these concerns because I believed the agreements would not harm the average working person in those nations."

However, Clinton (as well as then Rep. Sanders) voted against the Trade Act of 2002, which expanded duty-free exports from Colombia, Bolivia, Ecuador and Peru and gave President George W. Bush "fast-track authority" to approve trade deals with South American countries.

The Sanders campaign pointed out that Clinton supported normalizing trade relations with China while campaigning for Senate in 2000, and, once elected, she also voted for legislation that included an amendment granting Vietnam normalized trade status. (Sanders voted against both.)

As a presidential candidate in 2008, Clinton had varying opinions on various trade deals, and she changed her position on NAFTA. She called NAFTA "a mistake" and opposed pending deals with South Korea, Colombia and Panama. She reiterated her support for free trade with Peru on the campaign trail.

"I support the trade agreement with Peru. It has very strong labor and environmental protections. This agreement makes meaningful progress on advancing workers’ rights, and also levels the playing field for American workers," she said in 2007. "The South Korean agreement does not create a level playing field for American carmakers. I am very concerned about the history of violence against trade unionists in Colombia. And as long as the head of Panama's National Assembly is a fugitive from justice in America, I cannot support that agreement."

As secretary of state, Clinton walked back her opposition to deals with South Korea, Colombia and Panama, and helped negotiate them as well as the Trans-Pacific Partnership. As a presidential candidate in 2016, Clinton has reiterated her opposition to CAFTA and flip-flopped on her support for the Trans-Pacific Partnership.

* This deal is not included in the Office of the U.S. Trade Representative’s list of free trade agreements, but contains many free trade provisions.

** This is a vote for "fast track authority" — allowing trade agreement to move through Congress without amendments or filibusters.

*** The free trade agreement with Bahrain passed by unanimous consent, not a recorded roll call vote.

Employment impact unclear

The debate over the impact of trade deals on employment has been waging for decades, and the jury is still out.

On one side, unions and some left-leaning think tanks often link American job losses to expanded trade. Labor advocates opposed the Chile and Singapore agreements, which they said in a 2003 report would kill an unspecified number of jobs.

The liberal Economic Policy Institute has found that NAFTA has cost the United States over 800,000 jobs and the South Korean deal about 60,000. In a 2014 report, the think tank reported that the United States has lost 3.2 million jobs between 2001 and 2013 to trade with China.

Business groups, on the other hand, argue that trade deals actually boost employment. For example, a 2010 report by the U.S. Chamber of Commerce found that the 14 trade deals in place in 2008 supported 5.4 million jobs.

Meanwhile, the U.S-China Business Council and the Financial Times contend that the loss in manufacturing jobs were not due to trade with China so much as gains in technology and productivity, as well as the result of a more sophisticated economy.

And in a recent fact-check, we found several nonpartisan reports demonstrating that NAFTA produced no significant job losses nor job gains. Analysis by economists at Tufts University and the University of Michigan projected no net impact on employment from the Chile, Singapore and South Korea deals.

Our ruling

Sander said Clinton voted "for virtually every trade agreement that has cost the workers of this country millions of jobs."

Out of the 10 trade deals Clinton could have voted on, she voted in favor of six and against two. On two other deals (with Peru and Jordan), she didn’t vote but did vouch for them.

As for Sanders’ point about subsequent job losses, independent research has shown the impact of NAFTA, for example, to not be significant one way or the other for jobs.

Sanders’ claim is partially accurate and needs additional information. We rate his statement Half True.