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.
Ban on dogs in the workplace being challenged in Lausanne
Skyguide renovation in the Jura mountains
More German to be taught in the French speaking cantons
New Vaud campaign against domestic violence
Warning to Lausanne drivers for this evening
Rise in family allowances in Jura from early next year
