WASHINGTON — Postmaster General Megan Brennan, who became the first woman to hold the position, is retiring early next year after working to stabilize the organization’s mounting financial woes.

Brennan took the job in 2015. The Postal Service says she will step down Jan. 31.

The announcement comes as the service has grappled with 12 years of net losses, due in part to declining first-class mail volume. Brennan earlier this year warned that the Postal Service would run out of money in 2024 unless Congress acted.

The agency also has met pressure from President Donald Trump, who insists it should charge higher shipping rates for online retailers such as Amazon, whose founder, Jeff Bezos, owns The Washington Post.

The Postal Service says it will conduct a nationwide search for a successor.