Prime Minister Justin Trudeau meets with Mexican President Enrique Pena Nieto during a bilateral meeting at the APEC Summit in Danang, Vietnam, Nov. 10, 2017. (THE CANADIAN PRESS/Adrian Wyld)

DANANG, Vietnam — From the outside, it looked like yet another bilateral meeting between Justin Trudeau and his continental ally, Enrique Pena Nieto, on the sidelines of yet another leaders' summit. But this time, the Canadian prime minister had a somewhat atypical agenda for his face-to-face chat with the Mexican president. Earlier on HuffPost:

Trudeau and Pena Nieto, who have built a good relationship in NAFTA's negotiating trenches, gripped hands and exchanged warm greetings inside the meeting room. It was the Canadian leader's first bilateral meeting on the margins of this year's Asia-Pacific Economic Co-operation summit at a palm-lined, seaside resort in Vietnam. The Canadian team had planned it that way. A key topic of discussion, as they sank into the yellow cushions on their chairs, focused on the Trans-Pacific Partnership trade talks. We were not going to be rushed into a deal.Prime Minister Justin Trudeau Heading into APEC, a senior Canadian government official said Ottawa had been anticipating pressure from TPP partners Japan and Australia, two countries that wanted to move forward quickly with sealing the 11-country deal. The Trudeau government, on the other hand, wanted to throw some sand in the gears. Ottawa had been pushing the other parties to make changes to how the treaty would affect areas like culture, intellectual property and the auto sector. "We were not going to be rushed into a deal," Trudeau told reporters at his closing APEC news conference on Saturday, echoing warnings he had issued repeatedly over the course of the week. The official, who spoke on condition of anonymity due to the sensitivity of the matter, provided a peek behind the scenes of what followed during the TPP talks in Danang.

AFP/Getty Images Trade ministers and delegates from the remaining members of the Trans Pacific Partnership (TPP) attend the TPP Ministerial Meeting ahead of the Asia-Pacific Economic Cooperation (APEC) leaders summet in the central Vietnamese city of Danang on Nov. 9, 2017. (NA SON NGUYEN/AFP/Getty Images)

The Canadian team had no plans to agree to the deal at Friday's TPP leaders' meeting unless the modifications were made. And they knew they had some allies. They had also been informed about unease about the deal among a few of the other countries. Indeed, the official said Japan and Australia tried to railroad Canada into committing to an agreement in principle Friday by arguing the other TPP members would be disappointed if they didn't deliver, the official said. That's where Mexico fit in. Support from the south Trudeau explained his situation to Pena Nieto, who reassured him that if Canada didn't sign on to the TPP, Mexico wouldn't either, the official said. Mexico had been sending similar signals of restraint about signing on to a new TPP. The talks were "very productive,' but more discussion was needed, Mexican Economy Minister Ildefonso Guajardo was reported to have said on Thursday. The official added that Pena Nieto likely offered his support for two reasons: Mexico wasn't 100 per cent comfortable with the deal on the table and the fact Canada has stood by it through the tough NAFTA renegotiation with U.S. President Donald Trump.

POOL New / Reuters Leaders pose for a group photo at the APEC economic leaders meeting in Danang, Vietnam, November 11, 2017. (REUTERS/Hau Dinh/Pool)

Shortly after Pena Nieto left, Trudeau held his next bilateral of the day in the very same room — this time with Japanese Prime Minister Shinzo Abe. But this meeting lasted more than twice as long as the Mexico bilateral, a sign of tough talk. Abe came to APEC looking for a win — an announcement from Pacific Rim leaders that their huge trade deal would move forward just months after it had been left for dead following Trump's withdrawal earlier in the year. More from HuffPost Canada: Canada's Push For A 'Progressive' TPP May Hit Roadblocks

Here Are Canada's 10 NAFTA Demands

BLOG: Canada Should Think Twice About Fixing The Unfixable TPP After the meeting, Trudeau and Abe were supposed to walk a short distance to a scheduled TPP leaders' meeting. Some of the TPP players, including Japan and Australia, had expected the meeting to be a signing ceremony for an agreement in principle, the official said. But the signing never happened, much to the chagrin of many an Asian country. Delayed meeting Canada asked for a bilateral meeting with Japan out of his respect for Abe and the countries' strong relationship, the official said. The plan was to tell him where Canada was coming from. Abe was also informed about Mexico's position on the matter, the official said. Their meeting was positive and it stretched for about 50 minutes, even though it had only been scheduled for half that time. It cut into the planned TPP leaders' meeting and kept the other leaders waiting for them in the room. Over the course of that meeting, Abe, the TPP meeting's co-chair, said he would have to postpone the event. He left to tell the others about the postponement and Trudeau stayed behind in the bilateral-meeting room. Trudeau faced sharp criticism on social media and in news reports for not attending the TPP meeting. The official disputes the notion it was a snub because the leaders would mingle at APEC events over the next 24 hours anyway.

Nguyen Huy Kham / Reuters Prime Minister Justin Trudeau attends a news conference during the APEC Summit in Danang, Vietnam, Nov. 11, 2017. (REUTERS/Nguyen Huy Kham)