Months of debate over Mountain View’s proposal to charge Google and other businesses a tax based on the number of their employees culminated with a resounding victory Tuesday night, with unofficial election results showing ballot Measure P captured 69.22 percent yes votes.

And in the Mountain View City Council race, Mayor Lenny Siegel and Councilwoman Pat Showalter were swept out of office in a contest where six candidates vied for three seats.

With all precincts reporting, the candidates who won council seats were challengers Ellen Kamei, who led everyone with 19.20 percent of the vote, followed by Alison Hicks with 17.7 percent and Lucas Ramirez with 17.67 percent. Pat Showalter came in fourth with 17.23 percent, followed by Siegel with 15.59 percent and former Councilman John Inks with 12.54 percent.

The ballot measure, which went by the nicknames “Google tax” and “head tax” before it officially became Measure P, passed with 69.22 percent of the vote. It allows the city to tax businesses between $8 and $149 per employee based on a progressive payment scale. The tax is estimated to generate upwards of $6 million a year for the city — $3.3 million from Google alone.

In addition to a progressive flat rate, the city’s roughly 3,700 businesses will pay a progressive per employee rate. Businesses with up to 50 employees will pay a base rate of up to $75 per year and those with more would shell out a base rate plus a per-employee fee that climbs with the work force’s size, up to a maximum of $150 each at Google. The tech giant employs a little more than 23,000.

The bulk of that money will be funneled to the city’s general fund, although the city has indicated it would be poured into efforts to reduce traffic congestion, enhance bicycle and pedestrian routes, and provide affordable housing and homeless services.

Mountain View forged ahead with its controversial proposal around the same time that Seattle walked back a similar plan amid fierce opposition from local business titans such as Amazon and Starbucks.

Cupertino briefly considered a similar tax earlier this year but opted to wait and spend more time crafting a viable plan while engaging with the business community. Locally, San Jose, Sunnyvale and Redwood City already use a head tax model.

Proponents say businesses should pay their fair share for fixing the problems they helped create.

The measure had its share of detractors, which include the city’s Chamber of Commerce and the Silicon Valley Leadership Group. When the issue came up for a council vote in June, representatives from both groups complained that the tax unfairly burdens one company with 60 percent of the tax.

The tax will be phased in over two years starting in 2020.

City Council

In the race for council, building more housing in a city that’s filled with an abundance of workers and tech giants was a top concern that divided the six candidates. They differed on how quickly units should be built, how many should be geared for low-income renters and how much commercial development should occur.

It’s a critical issue for a city that outpaces others in the county in home construction and could see more than 15,000 new rental and ownership units built in the near future.

Marijuana Business Tax

Voters also handily passed Measure Q, which will tax marijuana businesses up to 9 percent of gross receipts. The measure received 80.69 percent yes votes.