A blockbuster Pacific trade pact abandoned by U.S. President Donald Trump has edged closer to becoming reality after days of tense talks in Vietnam. Japanese Economy Minister Toshimitsu Motegi said the 11 remaining members of the Trans-Pacific Partnership had secured a framework agreement on how to salvage the deal. Canada, which had held out for a day on signing onto the agreement, said it had won some desired concessions while warning that work is needed to reach a full deal. Motegi spoke to reporters in Danang late Friday night, after ministers held another meeting and confirmed the content of the broad agreement, which includes sections to be suspended after the U.S. withdrawal earlier this year. Motegi and his Vietnamese counterpart are set to hold a briefing on Saturday to unveil the content of the deal, he said. “We reconfirmed the agreement from yesterday, including all the details of the wording used,” Motegi said. “There’s no mistake,” he said, referring to initial claims from Japan on Thursday night that a deal had been struck that were disputed by other countries, causing confusion. No changes were made to the text, he said. Canada’s Trade Minister Francois-Philippe Champagne defended the delay, saying he had refused to be rushed into an agreement on what he now called the Comprehensive Progressive TPP. The frictions in talks—which saw the chief Vietnamese trade negotiator walk out late Thursday night in frustration—had raised concerns the deal, which took years to negotiate, might collapse entirely. “What we’ve been able to achieve is to preserve market access in Japan, we’ve been able to improve the progressive elements and we’ve also been able to suspend key sections like intellectual property which our Canadian stakeholders thought would have an impact on innovation,” Champagne said late Friday in an interview in Vietnam. “We did what’s right for Canadians,” he said. “This was never about this Friday, this was about the next decade, this is about shaping the terms of trade in the Asia-Pacific region.” Champagne cautioned there was months of work ahead to bring the TPP to completion. “We made progress, but we clearly identified the things we still need to work on,” he said. “We have a framework that has been established, so in the sense that we know the elements that people wanted to preserve,” Champagne said. “We’ve also identified a number of work programs, including from the Canadian side, the one on cultural diversity. That means over the next six to eight months we need to work on that.” The TPP, which would have covered 40 percent of the global economy, was thrown into disarray when Trump withdrew the U.S. in one of his first acts as president due to a perceived risk to American jobs, leaving other countries scrambling to keep the deal alive. The TPP discussions in Vietnam centered around suspending some parts of the agreement in a bid to move forward without America’s involvement. Reached Framework The TPP was seen as a hallmark of U.S. engagement with Asia under the prior administration and a buffer against China’s rising clout. Then-Defense Secretary Ash Carter called it more strategically important than having another aircraft carrier battle group in the Pacific. It would go beyond traditional deals by including issues like intellectual property, state-owned enterprises and labor rights. The push for the TPP comes at a time when protectionist winds are sweeping the globe. Trump in his speech Friday to APEC business leaders warned he’d no longer join multilateral deals like the TPP but would seek bilateral pacts—and only with countries that played by the rules. “We are not going to let the United States be taken advantage of anymore,” Trump said. APEC Statement Still, APEC ministers released a statement Saturday morning—three days after their meeting wrapped up—pledging to fight protectionism and citing the work of the World Trade Organization in ensuring international trade is rules-based, free, open and fair. The ministers said they would “recommit to fight protectionism, including all unfair trade practices, recognizing the role of legitimate trade defense instruments.” Motegi said TPP ministers initially reached a framework agreement on Thursday night. The Canadian delegation then told the Japanese just ahead of the planned meeting of TPP country leaders on Friday that the time was not yet right for them to approve it, Motegi said, and that meeting was canceled. Questions swirled Friday over Prime Minister Justin Trudeau’s absence from that scheduled meeting as the TPP’s fate remained unclear. Champagne said Trudeau didn’t attend because another meeting ran late. There was “never an intention not to show up,” he told reporters. Malaysian Prime Minister Najib Razak told the APEC CEO summit on Friday he was “reasonably confident” of a successful outcome. “There was a meeting last night that went on until three this morning and we are coming up with our statement,” he said. “Of course there is work to go through, the process of ratification and some side matters that will now need to be worked out. But at least we’ve managed to salvage some kind of free trade agreement.”