President Donald Trump on Wednesday toured a Texas plant that makes high-end Apple computers, chatting with Apple’s chief executive, Timothy D. Cook, and accepting a plate with the words “Assembled in USA.”

It was a pretty typical publicity event, until the end. Trump walked in front of the news cameras and took credit for the plant, suggesting it had opened that day. “For me, this is a very special day,” he said. Cook stood next to him, stone-faced.

The plant has been making Apple computers since 2013.

Immediately after Trump’s comments, Cook thanked the president and his staff. “I’m grateful for their support in pulling today off and getting us to this far. It would not be possible without them,” he said. He did not correct the record.

The moment was part of a bizarre afternoon in Texas, where the president played up a 6-year-old factory as evidence of his 3-year-old presidency’s success in bringing manufacturing jobs back to the United States.

It showed Trump’s willingness to leverage his influence over U.S. companies in his pitch to voters that he deserves another four years in the White House. And it illustrated the complicated position that Cook and other corporate executives find themselves in with this president, forced to stand silently by while he sometimes misleads about their businesses.

After Trump departed the factory, he tweeted, “Today I opened a major Apple Manufacturing plant in Texas that will bring high paying jobs back to America.”

Today I opened a major Apple Manufacturing plant in Texas that will bring high paying jobs back to America. Today Nancy Pelosi closed Congress because she doesn’t care about American Workers! — Donald J. Trump (@realDonaldTrump) November 20, 2019

Apple officials didn’t respond to a request for comment.

The plant Trump toured is owned by Flex, a company that has made Apple’s top-of-the-line Mac Pro computers there since 2013.

When Apple decided to make the Mac Pro in the United States in 2012, Cook went on prime-time television to announce it. Apple had previously assembled virtually all of its products in China. Yet when production of the computer began in Texas, it quickly ran into problems, in part because of a lack of nearby suppliers.

Earlier this year, Apple unveiled a new version of the Mac Pro, with a starting price of $6,000. Shortly after, Apple and the White House began a monthslong public dance over where the computer would be made.

Apple said it needed waivers from tariffs the White House had imposed on certain Chinese-made components, like power cables and circuit boards, to keep making the Mac Pro in Texas. At first, Trump tweeted no, but the White House later granted 10 of the waivers.

On Wednesday, Cook showed Trump the new Mac Pro, which recently began coming off the plant’s assembly lines. He pointed to different components in the computer and ticked off which states they came from.

Apple uses 9,000 suppliers across all 50 states for its products, it said. Nearly all of those suppliers ship their parts to China, where Apple’s manufacturing partners assemble the vast majority of the company’s devices, including iPhones, iPads, MacBooks and the Apple Watch.

Those Chinese factories employ millions of people. Flex’s plant in Austin employs about 500 workers, who assemble one of Apple’s lowest-volume products.

After Trump’s comments Wednesday, Cook used the moment to pitch Apple’s new Mac Pro computer. “It can perform 56 trillion tasks per second,” he said. “It’s an example of American design, American manufacturing and American ingenuity.”

He then noted that before Trump had arrived that day, Apple had broken ground on a nearby, previously announced $1 billion campus in Austin. Those offices are expected to open in 2022 with about 5,000 white-collar employees in areas like engineering, sales, operations and customer support. The campus could eventually house 15,000 workers, but none are expected to be in manufacturing.

Cook has become one of Trump’s top allies in corporate America, despite their differing styles and disagreement on certain issues. Cook has openly criticized Trump’s policies on the environment and immigration, but he has put those concerns aside to lobby Trump on issues like tax and trade.

Under the Trump administration’s tax cuts, Apple last year brought back the vast majority of the $252 billion in cash it had held abroad, saving it billions of dollars in taxes. It has since returned much of that money to shareholders.

The trade war between the United States and China acutely threatens Apple’s business. Apple is already paying tariffs on some products, and it is set to pay more if the next round of tariffs go into effect next month. Apple has been asking for waivers from those tariffs. When asked Wednesday whether Apple will get those waivers, Trump replied, “We’ll look into that.”

On Wednesday, Trump called Cook a “very special person” because of his ability to create jobs. He turned to Cook and said, “What would you say about our economy compared to everybody else?”

Cook replied, “I think we have the strongest economy in the world.”

“Strongest in the world,” Trump said.

The president then took questions on the impeachment inquiry and launched into a tirade against “the fake press.” Cook stood silently nearby.

This article originally appeared in The New York Times.