The Touchless car wash and gas station on the corner of Divisadero and Oak streets is set to be replaced with a 186-unit apartment complex that the San Francisco Planning Commission approved Thursday.

Commissioners voted 5-2 to approve the development at 400 Divisadero St., which will be by far the largest residential project on Divisadero Street or in the Lower Haight neighborhood.

The approval process dragged on for five years, in part because two pieces of legislation changed the zoning and affordable housing requirements in the neighborhood. One increased the density of units allowed and the second, sponsored by District Five Supervisor Vallie Brown — raised the affordable housing requirement from 12% to 20%.

The Affordable Divisadero group, led by Dean Preston — Brown’s opponent in the November election — argued that even 20% is too low. He pushed to increase the affordable level to at least 33%.

Planning Commissioner Richard Hillis said he would love to see a project on Divisadero that is 50% or 100% affordable, but that would be possible only if the city owned the land and subsidized the development. With a privately owned parcel and no public subsidy, 20% is as much as could be expected, he said.

“We haven’t seen any new development, to tell you the truth, along Divisadero or anywhere in the Lower Haight,” he said. “This project does everything we are asking (developers) to do.”

Many of the community members who spoke at the hearing Thursday credited developer David Kriozere with incorporating neighbors’ ideas. He redesigned the project several times, shrinking the apartments to squeeze more onto the site and moving the main entrance from the corner to mid-block on Oak Street. Kriozere said he took part in over 1,000 meetings about the project, including weekly “beer with a developer” sessions at the Madrone Art Bar, a block away from the development site.

Tim Seufert, a former Haight-Divisadero Neighbors and Merchants Association board member, said he doesn’t like everything about the proposal, but that “it’s just time to stop the bickering and move on.”

Brown said she is particularly excited about 37 affordable units that will be part of the project.

“I’m hoping these apartments will relieve some of the pressure of the housing crisis,” she said.

J.K. Dineen is a San Francisco Chronicle staff writer. Email: jdineen@sfchronicle.com Twitter: @sfjkdineen