Democratic presidential hopefuls Hillary Clinton and Barack Obama threatened to pull the United States out of the free trade agreement with Canada and Mexico unless it's renegotiated.

Clinton and Obama, who have both been critical of the North American Free Trade Agreement during their campaign, made the comments in a debate in Cleveland Tuesday. The deal is wildly unpopular with blue-collar workers in Ohio where manufacturing jobs have been lost.

NBC News moderator Tim Russert raised the issue, referring to a 1993 debate between then vice-president Al Gore and 1990s presidential candidate Ross Perot, in which Gore said if the U.S didn't like the agreement, it could get out in six months.

Clinton was asked if she would notify Canada and Mexico that the U.S. would pull out of the North American Free Trade Agreement within six months of her presidency.

"No. I will say, we will opt out of NAFTA unless we renegotiate it," Clinton said. "And we renegotiate it on terms that are favourable to all of America."

Clinton said her demands would include tougher enforcement of labour and environmental standards, adding that she would take out the ability of foreign companies to sue the U.S. over its protection of workers.

When pressed on the issue again, she responded: "I'm confident that as president, when I say we will opt out unless we renegotiate, we will be able to renegotiate."

Clinton was also grilled on whether she's been consistent in her criticism of NAFTA. Russert pointed out that the bill was signed during Bill Clinton's presidency and that in 2004 she had said the agreement had been good for New York and America.

But Clinton said that while some parts of America have benefited, others have not.

"Since I have been in the Senate, I have worked to try to ameliorate the impact of these trade agreements," she said.

"It is not enough just to criticize NAFTA, which I have, and for some years now. I have put forth a very specific plan about what I would do. And it does include telling Canada and Mexico that we will opt out unless we renegotiate the core labour and environmental standards."

Obama agrees with Clinton's view

Turning to Obama, Russert pointed to an Associated Press story that said Obama has been consistently ambivalent toward the issue and said that in 2004, in a talk to farmers, he suggested that NAFTA had been helpful. 

Obama said he agreed with Clinton's criticisms of the deal but insisted he has been consistent on the issue.

"I will make sure that we renegotiate in the same way that Senator Clinton talked about, and I think actually Senator Clinton's answer on this one is right. I think we should use the hammer of a potential opt-out as leverage to ensure that we actually get labour and environmental standards that are enforced.

"And that is not what has been happening so far. That is something that I have been consistent about."

With files from the Associated Press