Mountain View is likely to see two marijuana retailers set up shop by early next year, the mayor said Thursday, becoming the only city between San Francisco and San Jose to allow recreational sales.

The City Council last week voted 5-2 — after dozens of residents spoke mostly against the proposal — to allow two cannabis retailers and two cannabis delivery businesses to operate in certain areas of the city. Vice Mayor Lisa Matichak and Councilwoman Margaret Abe-Koga voted against the proposal.

To receive a license, operators must go through a lottery and a rigorous application process., . Operators will have to own or lease space before they can apply, pass a background check and reduce negative impacts to the community before receiving a conditional use permit. Permit fees will fund a new full-time police officer and part-time community services officer to regulate the businesses.

Matichak and Abe-Koga favored a compromise of two instead of four businesses, noting that this is new territory for the city and expressing concern over how the stores will affect children and roads that are already congested. Staff recommended allowing five establishments and the Environmental Planning Commission recommended three, according to a staff report.

We don’t have much data for how this will impact our community … this is all unknown to us,” Abe-Koga said. “I thought we should start out slow … (and) I really don’t want to be the center of cannabis for the area, to be frank.”

Matichak said the approved ordinance, which will come back for a second reading later this month, is out of step with the majority of residents.

“Almost all of the input the council received from residents was they didn’t want retail businesses,” Matichak said. “I would prefer none, but I was trying to find a compromise that I thought we could all live with.”

Mayor Lenny Siegel, who is up for reelection in November, said allowing cannabis businesses will help regulate marijuana better than prohibiting them.

“For legal activity, there should be a legal source,” Siegel said. “Every step in the process is regulated … (and) we have a very robust program of keeping kids out of the stores. … People all over Mountain View use marijuana and most of the people who use marijuana are productive and moral citizens.”

Roughly two-thirds of residents voted in favor of legalizing marijuana in 2016. A survey of more than 2,000 residents early this year found roughly 36 percent against any cannabis businesses in the city, but 29 percent said there should be no limit on the number of businesses.

Cannabis retail shops will be allowed downtown, in the San Antonio and North Bayshore neighborhoods and along El Camino Real, with the condition that they are at least 600 feet from schools and 250 feet from childcare centers and medical facilities.

Mountain View voters will weigh in on Measure Q in the November election, an initiative to tax cannabis businesses up to 9 percent on their receipts. If approved, the tax is anticipated to add $1 million annually to the city’s general fund.