Controversial Justice Minister Christoph Blocher has lost his seat in cabinet in a major political upset.
The two chambers of parliament, meeting to elect the seven-member government, chose Blocher's party colleague Eveline Widmer-Schlumpf instead following last-minute horse-trading among the parties.
The joint session of the House of Representatives and the Senate had been expected to confirm the seven members of the cabinet unchanged for the next four-year term.
The first four ministers were elected without incident but when it came to Blocher, the house was split. Blocher secured 111 votes, while 116 parliamentarians voted for wildcard candidate Widmer-Schlumpf. The majority was 120.
In a second round Widmer-Schlumpf garnered 125 votes out a possible 242, defeating the justice minister. She has yet to accept the nomination and will give her answer on Thursday.
In the run-up to the cabinet election the focus was on attempts to unseat billionaire businessman Blocher, who represents the rightwing People's Party.
The People's Party had threatened to go into opposition if Blocher was not re-elected.
Centre-right and centre-left parties regarded Blocher's combative manner as a threat to the tradition of consensus in the government.
On the eve of the election, the Christian Democrats declared that most of their members would vote against Blocher.
The Green Party, which is not represented in the cabinet, initially put forward a candidate to stand against Blocher. It withdrew its candidate shortly before the vote when Widmer-Schlumpf emerged as an alternative to Blocher.
The People's Party won a record 29 per cent of the vote in October's parliamentary elections - ahead of the three other parties in government.
Following the shock result of the vote on Wednesday, the People's Party called for a break in proceedings so that the parties could consult on the situation. The request was refused.
Both chambers of parliament went on to elect the two remaining members of the cabinet and Interior Minister Pascal Couchepin as president next year.
The assembly also appointed Corina Casanova as new Federal Chancellor.
The chancellor coordinates the work of the cabinet and is considered the highest-ranking public official in Switzerland.
The seven cabinet posts are currently divided up between the four largest political parties as follows:
Swiss People's Party 2
Social Democrats 2
Christian Democrats 1
Samuel Schmid (People's Party) 201 votes
Pascal Couchepin (Radicals) 205 votes
Hans-Rudolf Merz (Radicals) 213 votes
Moritz Leuenberger (Social Democrats) 157 votes
Micheline Calmy-Rey (Social Democrats) 153 votes
Doris Leuthard (Christian Democrats) 160 votes
New candidate Eveline Widmer-Schlumpf (People's Party) 125 votes
Aged 51, Eveline Widmer-Schlumpf has been a member of canton Graubünden's government since 1998, the first woman to hold office.
A lawyer by profession, she is head of the cantonal finance department.
She is also president of the cantonal finance ministers' conference.
Her father, Leon Schlumpf, was a cabinet minister for the People's Party between 1979 and 1987.
The term "consensus politics" describes the ongoing effort to achieve a balanced compromise among political parties and among the different cultural, linguistic and social communities that make up Switzerland.
One of the most obvious aspects of the Swiss power-sharing system is the way in which the distribution of cabinet seats reflects the relative strengths of the political parties, a practice first adopted in 1959.