Minnetonka went through the wringer to get a project for 10 affordable houses approved, and everyone felt it by the end of a dramatic City Council meeting Monday evening.

The council unanimously approved a zoning change and financing for the $6.7 million project, the climax of a regulatory process that began about two years ago. Before the vote, the standing-room crowd aired out every hope and fear about the housing shortage that's hurting the Twin Cities, Minnesota and the country.

Neighbors expressed worries about a multi-unit development in a single-family neighborhood. Leaders of a church said they wanted to do something good for people in need, then had their motives questioned because the church will reap a financial gain. A few activists recited suspicions of suburbs like Minnetonka that, for decades, they believe haven't done enough for poor people.

It was ugly. It was beautiful.

Soaking it all in were six council members and a second-term mayor who, along with city planners and staffers, have been blasted on social media, in news articles and on the op-ed page of the Star Tribune in recent weeks.

Supporters of the project wore T-shirts and stickers that said "Love Makes Room." However, it's difficult to impose emotional change on a neighborhood and voters. It's also expensive and risky to sell houses below market value. There were bruises all around.

"This has been sausage-making," Minnetonka Mayor Brad Wiersum said shortly before the vote. "It hasn't been pretty on both sides. It would be nice when this is done ... that maybe some people would say 'You know what, I apologize. I let the ends justify the means. I was wrong and I apologize for some of the things I said.'"

Kimberly Wilburn, a council member, told neighborhood residents that she understood they were more concerned about the density of units rather than the income levels of residents they would house. "The outcome of denying density is denying affordability," she added. "Even if that is not your intention, that is the outcome."

Two weeks ago, that's what the city itself looked like it was doing.

Minnetonka's planning commission rejected the proposal from Mills Church, a Minnetonka congregation with roots stretching to the 1800s, and Habitat for Humanity to build five duplexes, or 10 homes in all, on a portion of the church's property. Under the plan, the church would sell the land to Habitat at a discount, and the homes' pricing would be subsidized by the city and others to allow families with below-median incomes to buy them.

The planning panel's decision smelled of the kind of not-in-my-backyard thinking that's hurt the proliferation of housing all across the country and that has led to proposals in the Minnesota Legislature and elsewhere to wrest some control of housing from cities.

Minnetonka staffers and planners, however, wanted to see the project happen because it fit with the city's affordable housing goals. They disliked that it would force them to change the city's comprehensive economic plan for fear it would set a precedent other developers might use against the city to get future commercial and residential projects approved.

Specifically, the church and Habitat wanted five buildings in a space that — under the city's comprehensive plan — was limited to four. The planners told the church and Habitat to either reduce the number of buildings or add more space to the site.

The church had the perfect space that it could add to the project: its playground.

The extra couple tenths of an acre on which the playground sat were just enough to push the total above the ratio the city needed to approve the project without making a precedent-setting change to its comprehensive economic plan.

After the planning commission's rejection, Habitat officials talked with church leaders about whether it could afford to let go of the playground, Chris Coleman, the former St. Paul mayor who is now CEO of Twin Cities Habitat for Humanity, told me on Tuesday.

The church previously added land to the project after neighbors sought more buffer space around the duplexes. Habitat identified some potential funding to update the playground equipment and said it could still be used by the church.

"It was a negotiation, and I think it underscored that people did want to get to yes," Coleman said. "The challenge was that everybody had to give a little."

In the end, neither proponents nor opponents of the project left Monday night's council meeting entirely happy.

Scott Roeber, a resident of the neighborhood near the church, raised cost concerns about the project to the council. Afterward, he said the council reached "a very equitable decision."

"The city is reaching some of its goals. The church is doing what they want to do with the property. The homes are not massive, which the neighborhood didn't want them to be," Roeber said. "In some ways, nobody got what they wanted and in some ways everybody got what they wanted."

Minnesotans who don't live in Minnetonka got a step toward more housing. There are many more to go.