Harley-Davidson’s chief executive officer said he made the decision to build a plant in Thailand when it was clear the U.S. would abandon the Trans-Pacific Partnership, the free-trade agreement that President Trump withdrew from last year.

The motorcycle maker’s decision was the “Plan B” that Harley turned to after the U.S. abandoned the trade pact with a bloc of 11 countries mostly in Asia, CEO Matt Levatich said in a phone interview.

“We would rather not make the investment in that facility, but that’s what’s necessary to access a very important market,” Levatich said of the Thailand plans. “It is a direct example of how trade policies could help this company, but we have to get on with our work to grow the business by any means possible, and that’s what we’re doing.”

Harley has since said it will cut about 260 U.S. jobs as it shifts production from Missouri to its factory in York, Pennsylvania, amid a deepening demand slump. The Milwaukee-based company expects to start making motorcycles at the new manufacturing facility in Thailand later this year to circumvent what Levatich called “unbelievable trade and tariff barriers” in “critical” Southeast Asian markets.

The Thailand plant will allow Harley-Davidson to price its motorcycles more competitively in the region and still stimulate growth for its U.S. supply chain, Levatich said.

Trump, who pulled the U.S. out of the TPP last year, recently directed U.S. officials to explore returning to the pact that’s since been renamed the Comprehensive and Progressive Agreement for Trans-Pacific Partnership, or CPTPP.

While Trump’s reported comments were welcomed by members of the trade bloc, ministers from countries such as Japan, Australia and Malaysia said they opposed renegotiation of the deal to accommodate the U.S. should it decide to rejoin at a later date.

The president then tweeted last week that he was still opposed to joining and preferred bilateral trade agreements.

“We were very optimistic about what the TPP would enable for Harley-Davidson,” Levatich said. “It took seven years for it to come to fruition. We could see the writing on the wall, and we got busy with Plan B.”