French President Emmanuel Macron says the next six weeks are crucial for the future of Lebanon, as it struggles with an economic crisis and the aftermath of the explosion in Beirut a month ago.
Mr Macron is offering to host an aid conference in mid-October to help.
He is visiting Lebanon to press the country's leaders to form a government as soon as possible to implement reforms to tackle corruption.
Just before his arrival, political parties agreed on a new prime minister.
Mustapha Adib, Lebanon's former ambassador to Germany, said he wanted an immediate start to reforms and an International Monetary Fund rescue package.
The previous Lebanese government resigned amid widespread anger over the Beirut blast, which killed at least 190 people, injured 6,000 others, and devastated swathes of the city.
The cause of the disaster was the detonation of 2,750 tonnes of ammonium nitrate that had been stored unsafely in a warehouse at the capital's port for six years.
The World Bank estimated on Monday that the explosion caused as much as $4.6bn (£3.4bn) in damage to buildings and infrastructure. Other losses, including the impact on the country's economic output, could add up to $3.5bn, it said.
Demonstrators clashed with security forces on Tuesday during Mr Macron's visit, with riot police firing tear gas on protesters who reportedly tried to break into the national parliament.
A number of protesters were also reportedly arrested outside the French ambassador's residence as they called for the release of Georges Abdallah, a Lebanese militant imprisoned in France.
What did Mr Macron say?
The president arrived in Beirut on Monday night for his second visit since the disaster.
Mr Macron met representatives of UN and local aid agencies near Beirut's port and told them that he was ready to host a second international aid conference for the country. The first conference, days after the blast, raised pledges of $298m for immediate humanitarian relief.
"We have to focus in the next six weeks on the emergency," he said, adding that any work would be carried out "under very firm co-ordination" with the UN.
But Mr Macron also said that he would consider withholding financial aid or imposing sanctions on the ruling elite if there were no real change within the next three months.
He called for credible commitments from party leaders, including a timetable for implementing reforms and parliamentary elections within six to 12 months.
Lebanon came under French control 100 years ago after the defeat of the Ottoman Empire in World War One. The country declared its independence in 1943.
More on the explosion in Beirut
Can the new PM succeed?
In a speech on Monday, Mr Adib acknowledged the challenges facing Lebanon.
"There's no time for words, promises, and wishes," he said. "It's time to work hard, with everyone, to heal our country and bring back hope because all Lebanese are extremely worried."
One of his first acts was to visit Beirut's Gemayze district, which was severely damaged in the port explosion.
But people hurled plastic containers at his car, and called for "revolution". One man at the scene reportedly shouted: "Our children died."
The BBC's Orla Guerin in Beirut says Lebanese across the sectarian divide are weary of their political elites.
Few, she adds, seem to have hope that any new prime minister will deliver - either on reform or the investigation into the blast.
Anti-government demonstrators have staged mass rallies across Lebanon since October, calling for a complete overhaul of the political system.
Power is largely based on sectarian interests in the country, and successive governments have been accused of ineffective and elitist leadership.
Political appointments and many jobs depend on belonging to one of Lebanon's myriad religious communities, a situation which has led to patronage, cronyism and endemic corruption.
Even before last month's explosion, the country was in dire financial trouble as the currency collapsed, unemployment soared and poverty grew.
Who is Mustapha Adib?
Mr Adib, 48, was appointed Lebanon's ambassador to Germany in 2013.
He has a doctorate in law and political science, and previously taught at universities in Lebanon and France. He has also served as an adviser to former Lebanese Prime Minister Najib Mikati.
A group of former prime ministers, including Saad Hariri who leads Lebanon's main Sunni Muslim party The Future Movement, announced that they were endorsing Mr Adib after reviewing several names on Sunday.
Historically, governments have taken weeks or months to form after a new prime minister takes office, although parties have indicated a willingness to expedite the process under the current circumstances.
Until a new administration is agreed, outgoing Prime Minister Hassan Diab's government will continue in a caretaker capacity.