ZURICH--Swiss voters Sunday overwhelmingly rejected an initiative that would have imposed a federal inheritance tax, a charge which could have threatened many small and midsize firms that employ around 80% of the Alpine country's workers.

Roughly 71% of voters opposed the initiative, which organizers pitched as a way to shore up the country's social security system, while 29% supported the proposal, according to preliminary results from 21 out of the country's 26 cantons. Cantons are similar to U.S. states.

The initiative would have slapped a 20% tax on inheritances of more than 2 million Swiss francs ($2.2 million) passed directly onto children and replaced a mishmash of regional laws, most of which don't tax children who are heirs at all.

The Swiss government and industry groups had urged voters to reject the measure since many beneficiaries would have had to take on debt or sell their businesses to meet the tax bill.

The extent of the rejection didn't surprise analysts, as higher taxes remain a sensitive issue in the country. "There will be a sense of relief amongst most family-owned companies," said Patrick Emmenegger, professor of political science at the University of St. Gallen. "The Swiss however vote instinctively against any new taxes, and particularly those which could have negative economic consequences."

The initiative's proponents, the Protestant People's Party, said Switzerland needs a fairer and uniform inheritance tax. If the initiative had passed, the party proposed that two thirds of the revenue raised go to the country's social security system.

The rejection will please the Swiss business community, following a number of public votes which have muddied the country's business-friendly reputation.

Swiss voters two years ago backed the so-called Minder Initiative forcing publicly traded companies to get shareholder backing on executive compensation. A year later voters approved quotas for immigrants, a move that could hamper the hiring of qualified staff, and threaten its economic ties with the European Union.

At present only four of Switzerland's cantons impose inheritance taxes on wealth inherited from a parent. Heirs other than children pay rates ranging from 50% in Grisons to nothing in Schwyz.

Swiss voters also backed a proposed constitutional amendment that would permit the genetic testing of in vitro fertilization embryos.

Popular initiatives form a key part of Switzerland's direct democracy system, and are triggered when at least 100,000 signatures are collected to seek changes to the country's constitution.

Write to Neil MacLucas at neil.maclucas@wsj.com