The ongoing battle over redeveloping Cupertino’s massive Vallco mall site escalated Thursday when a state legislator blasted the City Council, alleging it illegally moved to cut the number of homes allowed on the site.

State Sen. Scott Wiener, D-San Francisco, said Thursday on Twitter that Cupertino “deleted 1,800 zoned housing units. This move is deeply outrageous & violates state law.”

Last week, the City Council approved up to 620 units on a 13-acre portion on the mostly vacant Vallco mall site. The 620 homes are far fewer than developer Sand Hill Property Co.’s 2,402 housing units, half of them affordable, along with 1.8 million square feet of offices and 400,000 square feet of retail planned on the site.

The larger project was approved last year under a state law, SB35, that Wiener authored to streamline residential projects that include affordable homes.

Friends of Better Cupertino, a group of residents who oppose the project, have sued the city to block the SB35 approvals. A hearing is scheduled next month, and if the opponents win, the project would have to seek new city approvals.

“If for any reason the permit gets overturned ... Cupertino will have deleted three quarters of the housing on the site,” Wiener said in an interview.

The council also banned office development and restricted maximum building heights to 60 feet. Officials cited concerns about allowing more jobs on the site, which would exacerbate housing demand.

Cupertino said in a statement that Wiener was incorrect, and that the city was following state law.

The city argued that the new housing limits don’t affect the Sand Hill Property plan that was approved under SB35. It said these changes ensure it “remains in compliance” with state housing law by allowing residential development on 13 acres and giving the developer the option to propose housing on the site’s remaining 50 acres.

Cupertino has a state goal of approving 1,064 new housing units by 2023 and is required to adopt plans to reach the goal. The California Department of Housing and Community Development threatened legal action this month if Cupertino doesn’t meet its goals. Wiener said he’s supportive of the housing agency considering legal action.

Wiener said banning office development on the Vallco site would also make it much harder to finance the housing there, particularly affordable units.

“What they're also doing is removing an enormous amount of affordable housing for low-income people,” he said. “We do need office (space) in the Bay Area. We have a growing economy. Office is a good thing as long as there is also housing.”

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