Voters in Switzerland have decisively rejected a proposal to cut net immigration to no more than 0.2% of the population.
The country's 26 cantons rejected the proposal, with about 74% of people voting no in Sunday's referendum.
Supporters of the measure argued that it would have reduced pressure on the country's resources. Opponents said it would have been bad for the economy.
Around a quarter of Switzerland's eight million people are foreigners.
The measure would have required the government to reduce immigration from about 80,000 to 16,000 people a year.
Under Switzerland's system of direct democracy, citizens can force a referendum if they muster enough signatures of support.
The country voted in February to re-introduce immigration quotas, in effect opting out of an EU free movement agreement.
The government still has to implement that referendum result, which threw relations with the EU into turmoil.
Two other referendums were also being held on Sunday: one on forcing the central bank to boost its gold reserves and one on scrapping a tax perk for wealthy foreigners.
They, too, failed to garner enough support for the measures to pass into law.
The immigration proposal was dubbed the Ecopop measure, after Switzerland's 40-year-old Ecopop movement which seeks to link environmental protection with controlling population growth.
The BBC's Imogen Foulkes in Geneva says that while unemployment is low and living standards are high, many Swiss worry about overcrowding and environmental degradation.
Switzerland's population has grown by over a million in 20 years, and is currently 8.2 million. Some 23% of its inhabitants are foreign nationals, most of them from EU states.
Last year, net immigration stood at 81,000, according to public broadcaster Swiss Info.
Supporters of the measure said restricting immigration would safeguard Switzerland's environment by reducing the need for new transport links and new housing.
The proposal also included a measure to limit overpopulation abroad by devoting 10% of Switzerland's overseas aid to family planning in developing countries.
Opponents, among them all the major political parties, argued that the proposals would be bad for the economy because business leaders wanted to be able to recruit skilled labour from across Europe.
They also feared that if passed, the measure could put the country in breach of its international commitments and damage its image.
Many environmental groups argued that if the Swiss really wanted to protect their environment, they should adjust their own lifestyles, the BBC's Imogen Foulkes said.
Immigration in Switzerland
- Switzerland's population is about 8.18 million - of whom 1.96 million are not Swiss nationals, according to the Swiss Federal Statistical Office (FSO)
- EU citizens make up the vast majority of immigrants in Switzerland
- The largest group of foreign nationals living in Switzerland is Italians; immigration from Italy started more than a century ago, but difficulties getting Swiss nationality meant many families remained Italian
- The second largest group comes from Germany, and the third largest comes from the former Yugoslavia.