The Zurich cantonal parliament only narrowly rejected voting rights for foreigners.
The move was being pushed by the left-wing parties. It would have allowed communes in the canton to make their own decision on whether to give non-Swiss the right to vote on local issues.
It was rejected by 84 votes, to 82 in favour. Two abstained.
Eight cantons, including Vaud and Geneva, allow foreigners to vote as well as hundreds of communes.
Parliament rejects WHO alcohol policy
Cyclist dies near the UN
Govt may buy fewer F-35s due to cost
Amnesty slams Bern police
Two men given house arrest after stealing vignettes
What's likely under the tree this year?
