U.S. Postmaster General Megan Brennan plans to retire in January, officials said Wednesday, following months of complaints from President Trump that the Postal Service was losing too much money and should be charging retail giant Amazon more for package delivery.

Trump had told aides repeatedly earlier this year that he would like to remove Brennan from her post, according to people with knowledge of the discussions.

But officials on Wednesday characterized Brennan’s departure as a normal retirement and said she would assist in the search for a replacement.

Brennan, a former letter carrier who is the first woman to head the postal agency, had resisted Trump’s push to double the rates charged to Amazon and other firms to ship packages — a drastic move that could cost the companies and post office customers billions of dollars.

Trump has repeatedly rained invective on Amazon’s founder, Jeff Bezos, and on his separate ownership of The Washington Post, which Trump regularly accuses of reporting “Fake News.”

Brennan had explained to the president in multiple conversations that he cannot undo Amazon’s contracts without a regulatory commission review, and had also argued that the relationship benefits both Amazon and the Postal Service.

In a statement released by the Postal Service, Brennan thanked the men and women with whom she had worked. “I have had the privilege to work with you over the course of my 33-year career,” she said. “You embody the spirit of public service, you earn the trust of the American people every day, and you continually reinforce my reverence for this institution and my abiding belief in our mission.”

Brennan added: “When I was appointed Postmaster General, I made a commitment to the Board of Governors that I would serve for five years and it has been my absolute honor to do so.”

The Senate recently confirmed three new members to the Postal Service’s Board of Governors, which elects the postmaster general and now has a quorum dominated by Trump appointees. That would have given the administration enough new members on the Postal Service’s oversight board to enable Brennan’s ouster, at least in theory, according to people with knowledge of the discussions.

The Board of Governors has 11 members, nine of whom are appointed by the president, as well as the postmaster general and her deputy. The nine-member board elects the postmaster general. There are still four vacancies, but with five governors, the board now has a quorum for the first time since 2014. And now Trump has installed three of his picks — a majority — on the board. 

Before Wednesday’s announcement, the White House rejected the notion that Trump’s nomination of three new members to the Postal Service board was in any way tied to the president’s desire to replace Brennan or that Trump hoped to see Brennan removed because she had been too soft on Amazon. 

 “This insinuation is so false that no one had the guts to go on the record with it, but giving gutless anonymous sources a platform to attack the President Trump and protect Amazon is a typical tactic of The Washington Post,” said Hogan Gidley, a White House spokesman, in an email statement several weeks before Brennan decided to retire. 

Bezos plays no role in the newspaper’s day-to-day coverage, and his ownership of the publication is separate from his role as Amazon chief executive. Amazon declined to comment. 

After months of attacks on Amazon and its shipping charges early in his term, Trump commissioned the Treasury Department to lead a task force on the Postal Service’s financial troubles. A December 2018 report from the task force concluded that the Postal Service “is on an unsustainable financial path” and is “forecast to lose tens of billions of dollars over the next decade.”

The Postal Service reported a net loss of $3.9 billion for fiscal 2018 — an increase of $1.2 billion in net losses compared to 2017, even as the agency increased its operating revenue by $1 billion. 

“She was running the joint on baling wire and bubble gum for five years,” Arthur Sackler, a longtime lobbyist for mailers, postal shippers and suppliers, said about Brennan. “She’s got to be worn down.”

Brennan worked closely on a deal reached in September that changed the fee structure for international mail and small packages, earning her praise from Peter Navarro, a senior White House economic adviser.

“One of my favorite people in this town is the postmaster general,” Navarro said in a CNN interview last month. “She has put all the resources of her agency to work on this.”

Since becoming president, Trump has taken an unusual interest in the Postal Service, according to current and former aides. He has asked for detailed briefings on its finances and operations and has complained repeatedly to senior aides about its status as a financial “loser,” three former senior administration officials said.

One of Trump’s greatest gripes is the Postal Service’s relationship with Amazon.

“I am right about Amazon costing the United States Post Office massive amounts of money for being their Delivery Boy,” Trump wrote in a tweet last year. “Amazon should pay these costs (plus) and not have them bourne by the American Taxpayer. Many billions of dollars. P.O. leaders don’t have a clue (or do they?)!”

Trump has also mused about privatizing the Postal Service, an idea long floated by various conservative think tanks, according to current and former senior administration officials, who spoke on the condition of anonymity to share private conversations. 

 John McHugh, chairman of the Package Coalition, a trade association that represents over 20 national brands and companies, including Amazon, said it is important to “look at this process as a whole” rather than just Amazon.

The package delivery system, McHugh said, “is by far the Postal Service’s most lucrative and highest returning business, and if you want to fix the Postal Service’s financial position — and I think the president really does want to do that — I think the last thing you want to do is artificially, on a nonmarket basis, disrupt that single profitable source of Postal Service revenue.”

Many of the Postal Service’s financial woes are tied to the 2006 Postal Accountability and Enhancement Act, which requires the agency to pre-fund its retiree health care benefits. During April testimony before the House Oversight Committee, Brennan cited the law and the agency’s “very sizable retirement-related payments” to explain some of the Postal Service’s challenges. 

Brennan assumed the postmaster general’s job in February 2015, becoming the first woman to hold the job. Before that, she served as the Postal Service’s chief operating officer and executive vice president. Brennan began her three-decade career as a letter carrier in Lancaster, Pa. 

Just before the August congressional recess, Senate Majority Leader Mitch McConnell (R-Ky.) included the confirmation votes of three new members of the Postal Service Board of Governors — John McLeon Barger, Ron A. Bloom, and Roman Martinez IV — as part of a broader package that passed by voice vote. 

Trump had previously complained to Treasury Secretary Steven Mnuchin about his frustrations with Brennan, according to someone familiar with the conversations. McConnell’s office was aware of the president’s desire to replace her, a second person familiar with the situation said. But, this person said, McConnell viewed the three new board members’ nominations as simply part of his role in filling executive branch vacancies.

Through a Postal Service spokesman, the three new members previously declined requests for interviews.

Damian Paletta and Lisa Rein contributed to this report.