A post office in Shelbyville, Ky. President Trump issued an executive order on Thursday demanding an evaluation of the Postal Service’s finances.

WASHINGTON — President Trump abruptly issued an executive order on Thursday demanding an evaluation of the Postal Service’s finances, asserting the power of his office weeks after accusing Amazon, the online retail giant, of not paying its fair share in postage.

In the executive order, issued just before 9 p.m., Mr. Trump created a task force to examine the service’s “unsustainable financial path” and directed the new panel to “conduct a thorough evaluation of the operations and finances of the U.S.P.S.”

The president does not mention Amazon in the order, but it is clear that he intends for the panel to substantiate his repeated claim that the financial arrangement between the Postal Service and Amazon, its biggest shipper of packages, is a money loser.

In December, Mr. Trump railed against the service on Twitter for being “dumber and poorer” by losing billions of dollars and not “charging MUCH MORE” to Amazon and other shippers. His Twitter attacks date back as far as 2013, when he scoffed at the service for planning to eliminate Saturday mail delivery — “our poor, poor Country,” he wrote — and raising the cost of stamps.

Postal Service experts and even Mr. Trump’s own advisers have privately urged him to back off the accusations, noting that the huge number of packages shipped by Amazon is actually helping to keep the Postal Service financially solvent.

While the service has consistently reported net losses for a decade, much of its financial woes are the result of a prolonged decline in the volume of marketing mail and first-class mail. The service makes money on packages, and Amazon is the service’s biggest single shipper of packages.

But the president has refused to believe those arguments, insisting in a tweet as recently as March 31 that “the U.S. Post Office will lose $1.50 on average for each package it delivers for Amazon.”

“That amounts to Billions of Dollars,” he continued.

Mr. Trump’s repeated attacks on Amazon have focused in part on the company’s billionaire owner, Jeff Bezos, who also owns The Washington Post. People close to Mr. Trump have said the president’s tirades against the retailer often come after The Post has published negative articles about him.

“The #AmazonWashingtonPost, sometimes referred…