WASHINGTON -- Some of Canada's most memorable elections have been about governments campaigning for free-trade deals.

This time a Canadian government will be negotiating one.

The next few weeks could play a determining role in the fate of the Trans-Pacific Partnership, a 12-country plan to create the world's largest trade zone.

Some countries are adamant they want a deal this month.

"I think there is probably a window of two or three weeks," said Mike Petersen, New Zealand's special trade envoy for agriculture. "There's a window where we could get this deal done. It's going to be really tight. There's going to have to be a lot of movement in the next two or three weeks."

He said this while preparing to board a plane out of Hawaii over the weekend, after negotiators got close to an agreement but couldn't finish it.

Japan's envoy described a similar timeline as he left the meeting. Economy Minister Akira Amari was quoted in different Japanese media as having told reporters that he expects ministers to meet this month to finish a deal.

That means that after rushing to the hustings a little sooner than expected, the Harper government might now have to simultaneously campaign, complete a trade deal, and prepare to sell the deal to voters on Oct. 19.

The government can argue that it still has a mandate to negotiate for Canada.

There's even a not-so-ancient precedent: a decade ago, an election-time Liberal government was involved in the ill-fated attempt to complete a global treaty at the World Trade Organization.

Canadians might have less recollection of that never-finished deal than of past elections where free trade was the main issue -- Brian Mulroney won in 1988 and Wilfrid Laurier lost in 1911 while campaigning on open commerce with the U.S.

The civil service has released its guidelines for what cabinet can and can't do during the 2015 election. It specifically mentions treaty negotiations, in the so-called caretaker convention published by the Privy Council Office on Sunday.

It says the government has a duty to protect the national interest: "When negotiations are at a critical juncture with timelines beyond Canada's control, the failure to participate in ongoing negotiations during the caretaker period could negatively impact Canada's interests. Under such conditions, a compelling case may be made for ongoing efforts to protect Canada's interests."

It adds that the government should exercise restraint while Parliament is dissolved and unable to hold it to account. A TPP deal would presumably be voted upon by the next Parliament, after the election.

The government intends to keep negotiating, in the runup to Oct. 19: "Canada has been and will continue to be a committed and constructive partner at the negotiating table," said Rick Roth, a spokesman for International Trade Minister Ed Fast.

After a decade of discussing this treaty, why are countries in such a rush to get it done this month? They're apparently feeling election pressure -- although it's not the Canadian vote causing the most anxiety -- it's the one in the United States.

If the talks linger into the fall, any hope of passing the treaty in the American Congress before the presidential primary season would all but vanish.

It could then be derailed by U.S. presidential politics, as Democrats on the left press Hillary Clinton to oppose TPP, while primary voters on the Republican right urge their candidates to thwart the Obama agenda.

Japan also has an election next year, and the Abe government there has already seen its poll numbers plunge amid accusations it's too cozy with the Americans.

Add it all up, and negotiators are starting to sweat. They fear this treaty could go the way of other star-crossed attempts at trade liberalization, like those WTO talks and the now-defunct Free Trade of the Americas.

"The problem is if we don't get it done in the next two or three weeks then the reality is it would probably be hard to do until the end of 2017," Petersen said.

"Which, of course, means that there's every chance that interest will be lost and it'll just fall over."

He said Canada had inched forward in Hawaii with a couple of offers to allow more dairy imports, but the offers came nowhere close to what New Zealand and Australia were asking for.

Their main concern, he said, was that the bigger markets -- the U.S. and Japan -- would continue using Canada's non-movement as an excuse to keep their own agriculture sectors closed.

"The key with Canada is, it's one of the dominos that needs to fall in order to unlock better offers from the U.S.A. and Japan."