Italian Prime Minister Silvio Berlusconi is to resign on Tuesday - more than three weeks after his narrow election defeat.
His announcement came after his centre-right alliance failed to get its candidate elected as Senate speaker.
Italy's highest court has confirmed the victory of the centre-left coalition in both houses of parliament.
Mr Berlusconi had until now refused to concede, saying the vote was too close. He will be replaced by Romano Prodi.
The outgoing prime minister said that he would chair his last cabinet meeting at 1230 on Tuesday (1030GMT), before handing his resignation to President Carlo Azeglio Ciampi.
Although Mr Berlusconi said he recognised Mr Prodi had "won the consensus", he insisted that his own right-centre coalition won a larger share of the popular vote in the Senate in the poll on 9-10 April.
"When someone has gained 220,000 votes more (than the opposition) there is little to do," he said.
"We comply because we are democratic, but inside ourselves we remain convinced that the majority prize has been wrongly assigned."
Earlier on Saturday Fausto Bertinotti, a veteran Communist leader, was elected speaker of the lower house - where Mr Prodi's majority is larger.
In the Senate, where the centre-left has a majority of only two seats, supporters of Mr Berlusconi fought particularly hard.
It took four ballots to elect Franco Marini, a moderate trade union leader, as speaker.
Romano Prodi voiced his relief at the election of the two speakers. "I am very happy," he said. "We have settled in."
But the BBC's David Willey in Rome says Mr Prodi got a taste of what it will be like to govern without a secure majority in both houses of parliament.
He adds that the centre-left will be particularly vulnerable in this upper house and the defection or sickness of only a single senator could put the future coalition at risk.
Mr Prodi, an Italian former prime minister and president of the European Commission, will be charged with forming a new government.
Our correspondent says Mr Berlusconi is likely to stay on as head of a caretaker government for the time being.
Under the constitution, the president must give the mandate to form a government and President Ciampi, whose term ends in mid-May, has already said he will leave the task to his successor.
Mr Berlusconi, who has been in office since 2001, has served longer than any other Italian prime minister since World War II.
However his popularity fell as the Italian economy faltered. The budget deficit has exceeded European Union limits for the past two years.
Mr Prodi has promised a review of government finance, better tax collection and the re-introduction of inheritance tax on the country's wealthiest people.