Luxembourg swore in a new prime minister for the first time in nearly two decades Wednesday as Xavier Bettel, the former mayor of Luxembourg city, replaced Jean-Claude Juncker, who had called early elections only to see his party lose ground.

Mr. Bettel, who also will be the country's first openly gay premier, will set out the new three-party coalition government's plans in parliament next Tuesday, a spokesman said.

Mr. Juncker, who has led the government since January 1995, formally handed in his resignation in the morning and Mr. Bettel and his ministers went to see Grand Duke Henri, the head of state, in the afternoon to formally take office.

Mr. Bettel will lead a coalition of his center-right Democratic Party, the Socialist party and the Greens. Together they hold 32 of the 60 seats in parliament.

Étienne Schneider, the Socialist candidate in October's election, becomes deputy prime minister while Foreign Minister Jean Asselborn stays in his post.