After more than a decade of planning, including a three-year legal battle, the $1 billion 5M project broke ground on Thursday.

Developer Brookfield Properties and partner Hearst, owner of The Chronicle, will transform four acres of parking lots and vacant buildings at 5th and Mission streets with two new towers, a 200-foot apartment building, two parks and renovated historic buildings. The project includes 702 residential units on site and helps fund another 154 affordable units nearby.

5M will generate more than $76 million in public benefits, including funding for affordable housing, transit improvements, the arts and community groups. Those contributions enabled the controversial project to win city approval in 2015.

But opponents sued the city to block 5M, spurred by concerns over gentrification. In March, the state Court of Appeal ruled in favor of the developers, clearing the way for construction to start. At the time, Angelica Cabande, director of the South of Market Community Action Network, called the decision a “huge giveaway ... that will have lasting negative impacts.”

A block and a half south of the Powell Street BART station, 5M will bridge the high-rise district rising around the Transbay transit center and the shorter buildings that reflect the area’s industrial origins. The new office tower will rise to 395 feet, and a 400-unit condo tower will reach 470 feet, making it SoMa’s tallest building west of Third Street.

“This shouldn’t be the same as downtown. This isn’t just downtown expanding. This is about how that transition happens between downtown and west SoMa,” said Laura Crescimano, principal of Sitelab Urban Studio, 5M’s master planner. “It’s about bringing together multiple uses.”

5M will create around 1,200 construction jobs and has space for 4,100 permanent new jobs.

The project includes The Chronicle’s headquarters at 901 Mission St., the newspaper’s home since 1924. The Chronicle will remain there.

The first phase of the project is expected to open in late 2021 and includes the 640,000-square-foot office tower at 415 Natoma St. and 302 apartments, including 91 affordable, middle-income units, at 434 Minna St.

Along Mary Street, a new 26,000-square-foot Mary Court public park will open with a dog run and children’s playground, replacing vacant lots.

“We know the strength and the primary amenity of the site is the open space,” said Jason Bonnet, vice president of development at Brookfield Properties. “Where else can you walk out of your home or walk out of your office ... onto a park that’s fronted by arts, by retail, a dog run, people walking around, activating the site?”

Bonnet said that the project would take inspiration from hotels and seek to generate activity around the clock with retail, food and performance spaces.

5M by the numbers $1 billion total budget cost 640,000 square feet of new office space 702 new housing units on-site, plus funding for 154 nearby affordable units 4,100 new jobs 49,000 square feet of new public open space Source: Brookfield Properties

Read More

The existing historic Camelline and Dempster buildings will also be renovated to include arts space and retail.

Community Arts Stabilization Trust will manage the Dempster Building at 447 Minna St. and is talking with local arts nonprofits to lease the space at below-market rents. The building is being renovated following a 2016 fire.

“We hope to bring to light and visibility the richness of the cultural programming ... already in SoMa,” said Moy Eng, executive director of the trust.

In 5M’s second phase, Hearst will build a 400-unit condo tower just south of the Chronicle Building, along with a 23,000-square-foot rooftop public park atop the newspaper’s office.

“Hearst and The Chronicle have been part of the SoMa neighborhood for over 130 years, and we look forward to remaining as an owner and tenant at 5M and a member of the neighborhood,” Stephen Hearst, Hearst vice president and general manager of Hearst Western Properties, said in a statement.

Plans for the project began in 2007, when Hearst sought developers for the underutilized site and later selected Forest City, which built the nearby Westfield San Francisco Centre mall expansion. Canadian real estate company Brookfield bought Forest City last year.

The partners filed a formal proposal in 2011, and increased the amount of affordable housing in 2015 as the region’s housing crisis grew. Along with 91 affordable units on site, 5M is donating land and providing funding at an adjacent parcel at 967 Mission St. for 83 units of senior housing. It also donated $18 million to help fund 71 affordable units at 168 Eddy St. in the Tenderloin.

“The affordable housing and community benefits of the 5M project will make SoMa and our entire city an even better place for our families, seniors, and young people,” Mayor London Breed said in a statement. “We cannot continue to wait years for projects with much needed housing like 5M to move forward.” Breed is sponsoring three November ballot measures to streamline and increase affordable housing development.

Neighborhood groups including the South of Market Action Community Action Network, Save Our SoMa and Friends of Boeddeker Park weren’t satisfied, arguing the project would accelerate gentrification and displacement in the area, and sued in 2016.

Jasper Rubin, a San Francisco State University urban studies associate professor and former city planner, lauded the project for its affordable housing and arts space.

But he said concerns remain over 5M’s impacts on the neighborhood, such as whether the open space will be inviting to longtime residents and if economic benefits extend beyond the project site.

“I understand the concerns of folks in the neighborhood,” he said. “One of the things they worry about is that the existing community isn’t benefiting.”

Roland Li is a Chronicle staff writer. Email: roland.li@sfchronicle.com Twitter: @rolandlisf