MEXICO CITY -- Mexico's peso firmed to its strongest in two months on Tuesday on bets that Democratic candidate Hillary Clinton would defeat her Republican rival Donald Trump in the U.S. presidential election.

Polls were seen favoring Clinton over Trump, who has threatened to rip up a free trade deal with Mexico and tax the money sent home by migrants in order to build a wall on the southern U.S. border.

The peso firmed 1 percent to 18.39 per dollar, its strongest since Sept. 8. The country's benchmark IPC stock index rose to its highest since mid-August, before paring gains to trade 0.83 percent higher.

Confirmation of a win by Clinton could fuel an additional rally by the peso to around 18 per dollar, according to analysts and fund managers.

But they said an unexpected victory by Trump could fuel a more than 12 percent drop in the currency to a record low of 21 per dollar. That could push the central bank to raise interest rates or directly intervene in forex markets to staunch the bleeding.

There could be an even bigger rally in the peso as funds that hold peso debt or companies operating in Mexico unwind bets they made in the derivatives market to protect themselves from the risk of a Trump upset.

"A Clinton win is fairly priced in," said Alessio DeLongis, a fund manager and macro strategist at OppenheimerFunds. "But what is difficult is accounting for the impact for all the unwinding of hedges."

The peso has oscillated wildly since May, slumping sharply whenever Trump's chances of winning were improving and rallying back when Clinton took a lead in polls.

The Mexican currency made sharp gains on Monday as traders boosted bets on a Clinton victory after the Federal Bureau of Investigation said it would take no action against her related to her use of a private email server while Secretary of State.

While the peso spot rate was trading around its recent highs and largely pricing in a win by Clinton, volatility measurements were off the charts, suggesting investors remained nervous that the peso could see very sharp swings.

Implied volatility in one-week peso-dollar options contracts surged to their highest since the 2009 financial crisis ahead of the election, although levels dipped this week.

Major banks have formally told clients to expect volatile currency markets in the aftermath of the U.S. election. One Goldman Sachs client said the bank told clients on Monday it would not accept new stop loss orders on the peso until further notice.

If Clinton wins, the peso was seen only gaining a bit more than 2 percent to around 18 per dollar, according to recent polls by Reuters. Weak growth and the impact of the collapse in oil prices on Mexico would limit further gains, analysts said.

Even before concerns about a Trump victory were taken seriously, the peso was one of the worst-performing major currencies this year due to worries about a bailout of state-run oil company Pemex and ballooning government debt.

A Trump win could spur the biggest peso loss since the 2008-2009 financial crisis.

"If we get a shocking result, the peso would slice above 20 like a hot knife through butter," said Paresh Upadhyaya, director of currency strategy at Pioneer Investments.

"We would probably start trading in a new range as investors begin to digest what a Trump presidency would mean for Mexico."

A deep slump in the peso could stoke inflation, but it would also help compensate exporters, who could face new tariffs under a Trump presidency.

Mexico's central bank head Agustin Carstens last week said the country was ready in case of an "adverse" result in the U.S. election, which he has said could hit Mexico like a "hurricane."