Moody’s Investors Service has upgraded D.C.’s credit rating to the highest possible level, the latest sign of the long distance the District has come since its days of fiscal mismanagement.

D.C. officials announced Thursday that Moody’s has boosted the District’s general obligation bond rating to Aaa from Aa1. In a press release on the upgrade, the credit-rating service cited the city’s “exemplary fiscal governance” and low expenses for public-employee pensions — a cost that is crippling many local governments — as the principal reasons for the improved rating.

“This rating is a recognition of the hard work our community has done to build a fiscally responsible city,” Mayor Muriel E. Bowser (D) said in a statement. D.C. Council member Jack Evans (D-Ward 2), chairman of the council’s finance committee, said the new rating “is an amazing accomplishment, given where we came from 23 years ago.”

In the mid-1990s, the nation’s capital flirted with financial ruin, prompting the creation of a federal control board to oversee the city’s budget and bailout legislation in Congress that allowed the District to offload its pension liability at the time and much of the cost of running the criminal justice system.

Since then, the District has operated under an independent chief financial officer who must approve all city spending. The District has also benefited from a booming economy and population growth, leaving it flush with tax dollars.