BERN, Switzerland (AP) — Swiss voters backed moderate parties in their general election on Sunday, and the nationalist Swiss People’s Party lost ground after mounting a campaign heavy on anti-immigrant sentiment.

The nationalists were projected to take 25.9 percent of the vote for the lower house, a drop from four years ago, according to projections from the public television station SF early Monday.

On the left, the Green Party also suffered a surprising setback, taking 7.9 percent of the vote. Both the People’s Party and the Greens were projected to lose seats in Switzerland’s lower chamber, the 200-member National Council.

The results halted 20 years of steady growth by the People’s Party in parliamentary elections, which are held every four years. The party, which drew just 11 percent of the vote in 1987, rose to capture 28.9 percent in 2007, while support eroded for two of the major center-right parties, the Free Democrats and the Christian Democrats.