Parties in Italy's governing coalition have agreed a 12-point deal backing Romano Prodi to continue as prime minister, his spokesman said.
The issue of troop deployments split Mr Prodi's coalition
The apparent accord came a day after Mr Prodi resigned after losing a key Senate vote on his foreign policy.
Several partners in his centre-left coalition had opposed Italian troop deployments in Afghanistan and plans to expand a US airbase in Italy.
President Giorgio Napolitano is to hold talks with political leaders on Friday.
The deal came late on Thursday as Mr Prodi held talks with leaders of his centre-left coalition partners.
"We have all agreed to the programme so that he can continue to govern," Reuters news agency quoted his spokesman, Silvio Sircana, as saying.
Reports said the 12-point programme included support for Italy's military presence in Afghanistan.
Mr Prodi's government had been forced on the defensive over the continued deployment of 2,000 Italian troops in Afghanistan, with strong opposition from some of his more left-wing coalition partners.
Plans for the expansion of a big US military base in Vicenza, northern Italy, had also sparked protests both within his government and on the street, with large demonstrations in Vicenza at the weekend.
US President George W Bush wants to strengthen the base by transferring from Germany to Italy another 2,000 US soldiers, taking the total number stationed in Vicenza to nearly 5,000.
Mr Prodi's government was brought down by two communist senators who rebelled against their own parties and joined the opposition in the key vote on Wednesday.
The motion had asked the Senate to approve the government's foreign policy.
Although it was not a formal confidence vote, Foreign Minister Massimo D'Alema had urged the government to resign if it could not win the Senate's backing.
President Napolitano will have the final decision on whether Mr Prodi should go to parliament with his present cabinet for a vote of confidence or form a new government.
But the concern, says the BBC's Christian Fraser in Rome, will be that the same risks are there.
With only a one-seat majority in the Senate Mr Prodi is still vulnerable.
In some areas the policy divisions are so deep that it is hard to see why in the medium term a new Prodi government would be any more stable than the first, whatever the parties may say, our correspondent adds.
BALANCE OF POWER IN ITALIAN SENATE AFTER 2006 ELECTIONS
Further detail of Centre-left seats (others)
Italy of Values - 4 seats
Popular-UDEUR - 3 seats
The Union - South Tyrolean People's Party - 3 seats
South Tyrolean People's Party - 2 seats
Consumers' List - 1 seat
Olive Tree - 1 seat
Autonomy Liberty Democracy - 1 seat
The Union (abroad) - 4 seats