Homeowners in the sinking Millennium Tower on Tuesday will submit a permit application to shore up the 58-story building by drilling more than 50 new piles down to bedrock, a nearly $100 million fix.

In an application to be filed with the city’s Department of Building Inspection, the Millennium Tower Association laid out plans for a “perimeter pile upgrade,” 52 steel and concrete piles that would shift a portion of the building’s weight from its existing foundation system to bedrock about 250 feet below.

While the application outlines about $30 million worth of work, the entire pile upgrade would cost nearly $100 million and take 18 months. The contractor would drill 22 new piles along Mission Street and 30 along Fremont Street. Each pile is 24 inches in diameter and weighs 140,000 pounds and would take three or four days to drill into place. A reinforced concrete “inner pile” would be installed within each steel shaft.

That shift would relieve stress on soils that have compressed beneath the building, causing it to settle more than anticipated and to tilt, according to engineer Ronald Hamburger of the firm Simpson Gumpertz & Heger, which designed the plan. The new piles on the north and west sides would limit future settlement of the tower to minimal levels and reverse the building’s tilt, according to Hamburger.

“We have high confidence in the engineers who designed this retrofit, and we look forward to working with the city and county of San Francisco to get the project under way,” said Howard Dickstein, president of the Millennium Tower Association’s Center board of directors. “While the city and other experts have always certified the building as safe, this solution will eliminate any lingering questions about its stability and ensure future settlement is within the normal range.”

One of the city’s flashiest luxury condo towers when it opened in April 2009, the Millennium, at 301 Mission St., has become notorious internationally over the past two years as San Francisco’s leaning tower, settling 18 inches and leaning 14 inches to the west. The flawed foundation sparked multiple lawsuits from residents against the developer, Millennium Partners, as well as the architect and engineers who designed the concrete and glass building.

Mission Street Development LLC, the tower’s original developer, agreed to perform and warrant the retrofit, which would eventually be paid for by a settlement reached in ongoing, confidential mediation.

Hamburger said the soils that are most heavily stressed are along the north and west sides of the building. That is because there is a deep garage on the east side, and the train box for the Transbay Transit Center is on the south side.

“It’s primarily the soils on the north and west side that are overstressed and as a result are compressing and allowing the building to settle and tilt,” said Hamburger.

The plan will be reviewed by a panel of experts, and if everything goes well, work could start in the late winter or early spring. The work would be underground and should not cause much of a disturbance to residents, Hamburger said. “There won’t be a lot of noise or pounding or vibration from the operation,” he said .

The tower sits on a 10-foot-thick concrete mat foundation, held in place by 950 reinforced concrete piles driven up to 90 feet deep. Under the retrofit plan, the 52 new piles would extend into bedrock beneath the compressible soils currently causing the settlement. They would be connected to the existing foundation by an extension of the concrete mat.

While it’s common for buildings downtown to be built on shorter friction piles as the Millennium is, the height of the tower and its concrete frame make it heavier than neighboring high-rises.

The developer, an affiliate of Millennium Partners, has been working with the homeowners for months to reach agreement on an appropriate plan to address harm caused to the residential tower by its settlement as well as tilting associated with surrounding construction activities by the Transbay Joint Powers Authority, which built the Transbay Terminal, and the developer of Salesforce Tower.

The developers blamed the sinking on dewatering that took place during the construction of the adjacent Transbay Transit Center, which they argued weakened the soil under the tower’s foundation.

Philip Aarons, a principal at Millennium Partners, said that the additional piles would make the tower “one of the safest buildings in California.”

“We have made clear from the beginning that getting to a ‘fix’ has been Mission Street Development’s top priority,” Aarons said.

In the 30 months since news broke of the building’s structural problems, the 419-unit tower has been in limbo, with few units on the market, and those are selling for well under asking.

In April, a four-bedroom unit sold for $4.66 million, 23 percent less than the asking price, and 13 percent less than it went for in May 2014.

“It will continue to trade at a discount until it’s fixed,” said Chris Foley, a partner with Polaris Pacific, which markets and sells new condos. “Once it is fixed, it will trade at market, but it will never be a premier building again.”

Part of the hope of the retrofit is that it will “restore the reputation of the building,” said P.J. Johnston, a spokesman for the developer.

J.K. Dineen is a San Francisco Chronicle staff writer. Email: jdineen@sfchronicle.com Twitter: @sfjkdineen