Months after The Post exposed the problem, the city Department of Homeless Services has finally started paying its bills on time.

As of July 1, DHS has managed to get 90% of its contracts under the city’s new budget either paid or about to be paid.

As The Post’s Nolan Hicks reported in May, the de Blasio administration had been late in paying nearly 80% of its contracts to homeless services providers — and that’s going back to 2013. (DHS wasn’t alone but just the worst: Other city agencies were paying late 59% of the time.)

Sometimes it would take so long — months or more — for payment that it forced charities to take out loans while they waited for DHS to process the paperwork required for payment. Employees at one nonprofit temporarily lost their health care benefits, while other outfits had to slow their hiring of more shelter staff because of payroll issues.

In other words, DHS incompetence harmed both its contractors and the homeless people the agency is supposed to help.

“We are grateful to our partners in government for working with us to achieve this milestone,” said Catherine Trapani, the executive director of Homeless Services United, the umbrella group for these nonprofits.

“We are also grateful to The Post for keeping up the pressure to make sure we got it done,” she added.

Here’s hoping the agency can keep it up.