President Trump rejoiced at the news that Apple will build its new Mac Pro desktops in the US.

On the same day the US Trade Representative's office denied a request from Apple to have five China-made components of the Mac Pro exempted from a 25% tariff.

Apple has already managed to win 10 exemptions for Mac Pro parts.

Visit Business Insider's homepage for more stories.

President Trump appears to be thrilled about Apple's declaration that it will build the Mac Pro in the US and not China, but that hasn't stopped his administration slapping the Cupertino firm with tariffs on some components.

Apple announced last week that its new Mac Pro desktop computers will continue to be manufactured at a plant in Austin, Texas.

And Trump joyfully tweeted a link to a Fox Business article about the news on Monday. "Great news! @Apple announced that it is building its new Mac Pro in Texas. This means hundreds of American jobs in Austin and for suppliers across the Country. Congratulations to the Apple team and their workers!" he wrote.

But on the same day, the US Trade Representative's office denied a request from Apple to be exempted from a 25% tariff on five Mac Pro components made in China, Bloomberg reports.

These parts include: the Mac Pro's optional wheels, a circuit board for managing the input and output ports, a power adapter, the charging cable, and a processor cooling system.

According to Bloomberg, the five parts which didn't gain exemptions were rejected because Apple "failed to show that the imposition of additional duties on the particular product would cause severe economic harm to you or other US interests."

The news is the latest in a confusing, months-long saga that has seen Trump veer between threats and celebration about Apple's decision to keep making the Mac Pro in Texas rather than China, against the backdrop of the ongoing trade war.

Apple has been making the Mac Pro in Texas since 2013 but, in June this year, the Wall Street Journal reported that the firm was moving the process to China.

President Trump pounced on the report and threatened tariffs on any Apple products made in China.

He wrote in July that Apple would not be granted a tariff waiver.

Trump later appeared to soften those threats, saying: "I think they're going to announce they're going to build a plant in Texas." It isn't clear whether this was referring to Apple's existing Texas facility.

Apple has also been affected by 15% tariffs that kicked in earlier this month, which has hit products including the Apple Watch and AirPods. The iPhone is expected to be impacted from December.