(CNN) -- A far-right party recorded the biggest ever share of the vote for a political party in Switzerland's history on Monday, after a controversial campaign that blamed foreigners for much of the country's crime.
A Swiss People's Party supporter waves a sticker featuring the Swiss flag during Sunday's elections.
The nationalist Swiss People's Party headed by Christoph Blocher rode a wave of anti-immigration sentiment to gain 29 percent of the vote.
The Green Party also scored well in Sunday's vote winning 20 seats in the 200-seat National Council, Switzerland's lower house of parliament. It previously held six seats, making this the Green Party's best ever showing.
The Social Democrats remain the second-largest party, despite dropping to 43 seats after gaining 19.5 percent of the vote, while the People's Party added seven extra seats, taking its total to 62.
The nationalists dismissed criticism of their campaign -- derided as racist by leftist groups -- and insisted that they were only trying to address legitimate public concerns.
"Public security in Switzerland is in danger. We have a lot of foreigners committing crimes. And the Swiss people are very sensitive to that," Gregor Rutz, the party's Secretary General told CNN.
The gains made by the nationalists will not result in radical changes to the make-up of the government, however, since Switzerland is run by a form of consensus politics.
Under the Swiss system, a multi-party coalition runs the country by convention with ministers appointed from the main parties.
Although the make-up of the government will stay almost unchanged, political analysts said the success of the People's Party and its hostile rhetoric reflected a growing, but worrying trend in Switzerland.
"This may be a surprise for those outside of Switzerland but not for us," Hans Hilter, a political scientist at Bern University, told CNN. "This type of very negative campaigning has been a feature of previous campaigns by them (the People's Party) and reflects concerns among a wide number of people that immigration levels are too high."
Foreigners comprise a quarter of the Swiss workforce and make up around 20 percent of the population of more than 7 million. The immigrant community is dominated by Albanians, Bosnians, and Turks, though most were denied a vote in Sunday's election because of the difficulty of gaining Swiss citizenship.
On the streets of this Alpine country, the polarizing campaign provoked accusations of racism against the Swiss People's Party and rioting in the capital Bern.
Blocher's party was widely criticized after an ad campaign featuring a poster of a white sheep kicking a black sheep off the Swiss flag. The party also called for immigrant families to be thrown out of the country if their child committed a crime.
In this usually tolerant country, the hardline approach proved popular as voters unhappy at rising immigration levels handed the Swiss People's Party the best-ever election result, surpassing the Radical Democrats' victory of 28 percent of the vote in 1919.
At the same time as the nationalist gains, the country elected its first black politician to the National Council, Ricardo Lumengo, who accused Blocher's party of "scapegoating".
"They are showing that we foreigners are responsible for everything that is bad and we found that they are just simple arguments. We condemn it," he told CNN.
Lumengo, who came to Switzerland as an asylum seeker from Angola, added: "It shows that in this country there is no social justice. A part of the population, they are living well, they have a good salary. But a big quantity of the population, they are living in the phenomenon of the working poor." E-mail to a friend
CNN's Frederik Pleitgen contributed to this report.