The former postmaster general of the US Postal Service "unequivocally stated" that the Amazon contract is profitable.

Earlier this week, President Donald Trump said that Amazon is "costing the United States Post Office massive amounts of money."

According to the ex-postmaster general, Amazon is actually playing a key role in improving the USPS' financial performance.

The former head of the US Postal Service is taking on President Donald Trump's campaign against the USPS' Amazon deal.

"Only fools, or worse, are saying that our money losing Post Office makes money with Amazon," Trump tweeted Monday. "THEY LOSE A FORTUNE, and this will be changed."

Trump doubled down with another tweet on Tuesday, saying Amazon is "costing the United States Post Office massive amounts of money for being their Delivery Boy."

However, according to Patrick Donahoe, who served as the postmaster general from 2010 to 2015, that's simply not true.

Donahoe "unequivocally stated that the Amazon contract is profitable for the USPS" while in conversation with UBS analysts, according to a note released by the bank on Thursday.

The former postmaster general broke down the fact that the USPS' business is split between mail — like letters and magazines — that only the government service could deliver, and "competitive products," or packages that rivals like FedEx or UPS could deliver. Package delivery legally needs to cover operating costs and 5.5% of USPS' fixed costs.

According to Donahoe, package products are covering "meaningfully more" than the 5.5% allocation. Last year, shipping-and-package revenue jumped by $2.1 billion, an increase of 11.8% over the previous year. According to the USPS, much of that growth was thanks to e-commerce.

Trump's $2.6 billion counterargument

US Postal Service employee Arturo Lugo delivers an Express Mail package during his morning route on February 6, 2013 in Los Angeles, California. Getty Images

Last year, the USPS reported a net loss of $2.7 billion on $69.6 billion in revenue. Critics, such as President Trump, argue that Amazon should increase the prices of package delivery to cover these loses.

A report by Citi last year found that if the USPS were to cover its costs by increasing package-shipping prices, each package would cost an average of $1.46 more to ship. Amazon would be one of the companies hit hardest if the USPS were to increase prices — Citi analyst Christian Wetherbee estimated that a price hike would cost Amazon $2.6 billion.

However, if the USPS were to increase prices, it could lose out on business to competitors such as UPS and FedEx — something that Donahoe acknowledged when speaking with UBS.

The business-to-consumer "package market is dynamic and the USPS is likely very cognizant of potential risk to package volumes if they significantly raise rates," Donahoe said, according to analyst Eric J. Sheridan.

The USPS' low fixed costs and mandate to deliver mail to Americans makes it an ideal option for Amazon's "last-mile" delivery, or a package's journey from a fulfillment depot to its final destination. While FedEx or UPS avoid last-mile deliveries in many cases as they tend to be unprofitable, the USPS can complete deliveries at a lower cost.

Amazon's contract with the USPS reportedly expires this October. However, despite Trump's battle against the company, Donahoe indicated it was unlikely that the USPS would substantially raise prices in an updated contract.

"USPS is cognizant of the importance of private shippers like Amazon and the role they have played in improving the organization's financial performance," according to the UBS note.