The managers of the sinking Millennium Tower in San Francisco said Friday that an overhead protection system the city ordered them to erect should be completed by Saturday.

The city’s Department of Building Inspection ordered the luxury condominiums’ operators to install the safety system, which will wrap around the entire 58-story building, after a window cracked on the 36th floor last week.

What caused the window to crack — and whether the crack is symptomatic of the building’s deeper problems — remains unclear. Since 2009, the tower has sunk by around 18 inches and is tilting to one side.

The department also required Millennium’s management to tape up the window from the outside to prevent it from shattering or popping out. The window had already been taped up inside the homeowner’s unit where the crack occurred. Rachel Miller, an attorney for the tower’s management, told department Assistant Director Ronald Tom in an email Friday that the window had been successfully taped from the outside.

On Wednesday, the department threatened to yellow-tag the building if its managers didn’t take a number of safety measures by Friday afternoon, which could have limited access to the tower.

In addition to the overhead protection system, the department also mandated that management inspect all of the building’s 416 units, repair a broken window-washing crane to allow inspectors to evaluate the window from the outside and complete a forensic report on what caused the window to crack.

But the department backed away from those threats on Thursday after meeting with the building’s operators — provided that they kept in close contact.

Dominic Fracassa is a San Francisco Chronicle staff writer. Email: dfracassa@sfchronicle.com Twitter: @dominicfracassa