The Free Democrats’ campaign platform called for more than $50 billion in tax cuts, more than twice what Mrs. Merkel’s Christian Democrats promised. Yet, even the more modest figure could be hard to achieve without deep and unpopular reductions in social spending; deficits have soared as a result of the economic crisis and the government stimulus plan meant to combat its effects.

For many of the postwar years the Free Democrats were a swing vote in a Parliament dominated by the country’s two major parties, the Christian Democrats and the Social Democrats. But the Free Democrats were out of power for the last 11 years, a stretch in the opposition that allowed the party to sharpen its stands for lower taxes and against bureaucratic red tape.

It also gave Mr. Westerwelle, the youngest leader in the history of the party, time to grow up. Before the 2002 election he set his sights on winning 18 percent of the vote, and to drive home the point he wore a pair of shoes with “18” emblazoned in the party’s trademark yellow on the soles. He also rode in a bright yellow bus he called the Guidomobile. The party fell far short of his target, earning itself just 7.4 percent of the vote and Mr. Westerwelle a reputation as a joker.

Mr. Westerwelle learned his lesson and cultivated a more serious image. His antics may have had a positive effect as well, broadening the party’s appeal beyond its traditional base among business owners by attracting younger professionals.

In addition to emphasizing the party’s trademark positions in favor of liberalizing the economy, Mr. Westerwelle also studied foreign policy, hoping to follow in the footsteps of Hans-Dietrich Genscher, a former party leader and current adviser whose two decades as foreign minister included German reunification.

“In the past few years, he has clearly been preparing himself for this role,” said Jan Techau, director of the Europe program at the German Council on Foreign Relations, where Mr. Westerwelle gave a lengthy foreign-policy address in May. But Mr. Techau described the appearance as cautious, emphasizing continuity in German foreign policy and reminiscent of the passive role for Germany favored by Mr. Westerwelle’s mentor, Mr. Genscher.

“Not living up to the country’s size and responsibility in the world is just not a sustainable foreign policy for Germany anymore,” Mr. Techau said. Although the Free Democrats have supported Germany’s participation in the NATO mission in Afghanistan, Mr. Westerwelle spoke out more strongly than Mrs. Merkel during the campaign about limiting the length of the deployment of the more than 4,000 German troops there.

While talking about nuclear weapons at his news conference on Monday, Mr. Westerwelle referred to “rearmament” when he clearly meant to say “disarmament,” and shortly afterward apologized for his exhaustion after a long election night.