Mayor Mitch Landrieu’s administration gave the green light Wednesday for Sheriff Marlin Gusman to begin moving hundreds of inmates into the city’s new $145 million jail, apparently averting a courtroom showdown that had been scheduled for Thursday morning.

After many months of construction delays, inmates are expected to be transferred into the 1,438-bed facility this month — a process authorities say will take a week or more to complete. Deputies have been training in the new jail on a regular basis to become familiar with the surroundings.

City officials inspected the building for the second time in a week on Wednesday and issued an occupancy permit — a document they previously withheld — after Gusman submitted plans showing that special needs inmates will be housed on the second floor, said Sarah McLaughlin, a Landrieu spokeswoman.

The issuing of the permit started the clock on a six-month legal deadline by which the sheriff must take down the temporary tents he has used to house overflow inmates since Hurricane Katrina.

It also was expected to make moot, though perhaps not cancel, a hearing scheduled for Thursday morning at which Gusman’s lawyers intended to ask an Orleans Parish Civil District Court judge to hold city officials in contempt of court for refusing to grant the occupancy permit.

In a feisty exchange earlier this week, the Sheriff’s Office accused Landrieu of interfering with Gusman’s bid to implement a series of court-ordered jail reforms at Orleans Parish Prison. The sheriff has said the move to the new jail will improve conditions for inmates drastically, bringing him closer to full compliance with the directives of U.S. District Judge Lance Africk.

For their part, city officials said they wanted only to ensure the jail had been constructed in keeping with a city ordinance requiring that it be able to accommodate groups of inmates who must be housed separately from the general jail population, such as women, juvenile offenders and those with substance-abuse issues.

The design of the jail plays a key role not only in implementing the mandatory jail reforms but also in the continuing dispute between Landrieu and Gusman over whether the city should construct yet another jail building to house overflow and special populations of inmates.

The sheriff contends the Phase III building is necessary, while the mayor wants instead to reduce the city’s inmate population, starting with the removal of hundreds of state prisoners Gusman is housing.

In a letter to Gusman’s lawyers last week, City Attorney Sharonda Williams expressed “continuing disappointment at the sheriff’s unwillingness to comply with the city’s zoning laws.” She said Gusman had refused to provide an up-to-date inmate housing plan, suggesting the city might seek to subpoena the information.

“We believe that this action evinces a disregard for the city, its laws and its officials,” Williams wrote. “We strongly disagree with your attempt to characterize our efforts to ensure compliance with the zoning laws as ‘sabotaging’ compliance with the consent decree.”

Gusman’s attorneys returned to Civil District Court, where they said they believed they had satisfied the city’s concerns over the design of the new jail after a similar standoff over a city stop-work order was resolved in July. Despite the earlier agreement, they wrote in a court filing, “the city is attempting to use the permitting process as a de facto stop-work order.”

The Sheriff’s Office stressed the urgency of the request, pointing to what they described as a Sept. 15 “deadline” to move inmates into the new jail.

If Gusman fails to open the new jail by that date, a court-appointed expert monitoring the progress of the jail reforms has recommended that all of the city’s inmates be transferred to other parishes whose jails have less oppressive conditions.

Follow Jim Mustian on Twitter, @JimMustian.