The tallest building of BART’s biggest residential development broke ground Wednesday in Oakland, promising to house hundreds of families feet from the MacArthur station when it opens in 2020.

The 24-story, 402-unit high-rise dubbed Skylyne will be one of the largest apartment buildings in the city. It had been in the making for more than a decade, and developers in recent years sought to more than double the tower’s height as demand for housing surged.

The neighborhood’s zoning doesn’t allow buildings above 90 feet, but developers McGrath Properties and Boston Properties got an exemption for setting aside 45 units for affordable housing and making investments in local parks and community programs. At 260 feet tall, the building will include 13,000 square feet of commercial space on the ground floor.

“Unleash the mammoth!” developer Terry McGrath said at a groundbreaking ceremony.

The high-rise — which faced opposition from neighbors who complained about its size and traffic impacts — is the final phase of the larger MacArthur Transit Village, which will have 875 housing units once it’s done. The development is tucked a block away from the BART station between Highway 24 and Telegraph Avenue.

“We went through an extensive, extensive community process,” said Councilman Dan Kalb, who represents North Oakland. “We must have had dozens of meetings more than were required by law. … We went through some tough negotiations to get to where we are today.”

Kalb said it makes sense for a high-rise to be built at the site, but not necessarily elsewhere in the district.

Mayor Libby Schaaf said the project will create a “whole new landscape” in the Mosswood and Temescal neighborhoods.

“Every unit of housing that gets built, even luxury housing, helps us alleviate this housing crisis,” Schaaf said. “People are moving to this city, and if we do not build new places for them to move into, they will displace someone who’s been living here all along.”

Amid the Bay Area housing shortage, agencies like BART and Caltrain are facing pressure to support transit-oriented housing projects outside their stations. The land on which the MacArthur project is being constructed was previously a surface parking lot.

BART Board of Directors President Robert Raburn, who represents the area, said the development is a model for what he wants to see elsewhere on transit lines. The agency recently set a goal to build 20,000 new units of housing by 2040.

“Getting passengers to our fare gates on foot, on bicycle and on transit are key elements of BART’s strategy, and this station is one of the leaders in making the transition to those modes,” he said. “But the best way to reduce greenhouse gas emissions is to build higher density, mixed-use developments within walking distance of our existing transit stations.”

Kimberly Veklerov is a San Francisco Chronicle staff writer. Email: kveklerov@sfchronicle.com Twitter: @kveklerov