Ms. Merkel’s allies for the past four years, the business-minded Free Democrats, lost their place in Parliament, missing the 5 percent cutoff for the first time since the party’s founding after World War II.

The humiliating defeat of the Free Democrats was symptomatic of simmering discontent at the fringes of German politics. A larger majority of voters chose the consensus and stability offered by the two main parties, both of which gained votes compared with the last elections. But a significant minority moved to extremes.

The right-wing Alternative for Germany, which wants to abolish the euro, fell just short of the 5 percent parliamentary threshold, draining votes from the Free Democrats and probably causing that party’s defeat. The Alternative party could be an annoyance to Ms. Merkel in the next four years and force her to pay more attention to the political right.

Some former Free Democrat voters said they had defected out of disappointment that the party had not come out more strongly against euro rescue plans. “I voted for the F.D.P. for 40 years,” said Anneli Ute Gabanyi, a political scientist who lives in Berlin and was attending the Alternative for Germany gathering Sunday night. “I finally said no.”

In the past three years, the Social Democrats have given crucial support to Ms. Merkel in Parliament in passing credit lines and aid packages, tied to painful reforms, for euro-zone countries in need. But the center-leftists are likely to extract a high price in domestic reforms — a minimum wage, or social change — in exchange for joining a Merkel government in which they would be clearly the junior partner. Preliminary official results showed them with 25.7 percent, far below their center-right rivals.

Sigmar Gabriel, the chairman of the Social Democrats, said Ms. Merkel called him early Monday, but he indicated that he was in no rush to begin coalition talks. Instead, the party will hold a conference at the end of the week to discuss with its membership how to proceed.