President Trump said Thursday he would be open to re-entering the Trans-Pacific Partnership if the massive multilateral trade agreement were made "substantially better."

"I would do TPP if we made a much better deal than we had. The deal was terrible, the way it was structured was terrible. If we did a substantially better deal, I would be open to TPP," the president told CNBC during an interview at the annual World Economic Forum.

Among Trump's first executive actions after taking office was his decision to formally withdraw from the 12-nation trade deal, which came together in 2015 after years of negotiations under the Obama administration. He has since touted his "rapid termination" of the agreement, claiming the U.S. is better off pursuing bilateral trade pacts.

"I like bilateral, because if you have a problem, you terminate. You don't have that same option" with broader trade agreements, he said Thursday.

The president's comments come days after Canadian Prime Minister Justin Trudeau, who is currently working with the Trump administration to revise the North American Free Trade Agreement, announced his intention to join a new version of TPP in March.

The other 11 countries have revived the deal since Trump abandoned it. Japan, Canada, Mexico, Australia and other nations wrapped up an agreement after two days of talks in Tokyo.

Such a deal would make it more difficult for the U.S. to reenter the agreement if Trump declines to enter negotiations in the next few weeks.

"We're going to stop the ridiculous trade deals that have taken everybody out of our country and taken companies out of our country, and it's going to be reversed," Trump said just days after his inauguration last January, as he signed an executive order to abandon TPP.