BERLIN - The German parliament formally elected Angela Merkel to a second term as chancellor on Wednesday, although by a smaller margin than expected, paving the way for her center-right coalition to take office later in the day.

Of the 622 members of the Bundestag lower house, 323 voted for Merkel, 11 more than she needed. However, the result was something of a setback for her as nine parliamentarians in the coalition parties withheld their support.

Merkel's conservatives won enough votes in the federal election on September 27 to form a government with the business-friendly Free Democrats (FDP) and put an end to their awkward four-year grand coalition with the rival Social Democrats (SPD).

Merkel, 55, became Germany's first female chancellor in 2005 and is the country's first leader to have grown up in the former communist East.

She has said the priority of her new coalition will be to ensure Europe's biggest economy emerges stronger from the financial crisis.

The government is promising billions of euros in tax relief, although it is unclear how it will finance the cuts at a time of rising debts and some conservatives have criticized the deal.

Together, the coalition parties have 332 seats in the Bundestag, which means Merkel could have trouble pushing through legislation opposed by many in her party or in the FDP.

President Horst Koehler will swear in Merkel and her new ministers later on Wednesday.

(Reporting by Madeline Chambers; editing by Andrew Dobbie)