The presidents of Turkey, Iran and Russia have failed to agree on a ceasefire that would forestall a Syrian goverment offensive in rebel-held Idlib province.

The United Nations fears the offensive could cause a humanitarian catastrophe involving tens of thousands of civilians.

Turkey's Reccep Tayyip Erdogan, Russia's Vladimir Putin and Iran's Hassan Rouhani, who are meeting in Tehran for a summit of key foreign players in Syria's war, agreed in a final statement that there could be no military solution to the conflict and it could only end through a negotiated political process.

But as Syrian government and Russian warplanes mounted air strikes in Idlib today in a possible prelude to a full-scale offensive, Mr Putin and Mr Rouhani pushed back against Mr Erdogan's call for a truce.

The Turkish leader said he feared a massacre and Turkey could not accommodate any more refugees flooding over its border.

Mr Putin said a ceasefire would be pointless as it would not involve Islamist militant groups it deems terrorists.

Mr Rouhani said Syria must regain control over all of its territory.

Russian air strikes on Idlib

Idlib is the insurgents' last remaining major stronghold and a government offensive could be the war's last decisive battle.

Tehran and Moscow have helped President Bashar al-Assad turn the course of the war against an array of opponents ranging from western-backed rebels to Islamist militants, while Turkey is a leading opposition supporter and has troops in the country.

The discussions in Tehran mark a crucial point in a seven-year-old war that has killed more than half a million people and forced 11 million to flee their homes.

In his opening remarks, Mr Erdogan said a ceasefire in Idlib would be a victory for their summit.

Mr Putin responded: "The fact is that there are no representatives of the armed opposition here around this table. And more still, there are no representatives of Jabhat al-Nusra or ISIS or the Syrian army.

"I think in general the Turkish president is right. It would be good. But I can't speak for them, and even more so can't talk for terrorists from Jabhat al-Nusra or ISIS that they will stop shooting or stop using drones with bombs."

In the final statement, the three men agreed on the need to eliminate so-called Islamic State, the Nusra Front, and other groups linked to al-Qaeda and designated as terrorists.

But there were other armed opposition groups who could join any ceasefire agreement, they said.

The communique also called on the United Nations and the international community to step up humanitarian aid to Syria and help in restoring basic infrastructure assets.

Efforts must be made to protect and to create conditions for the safe return of refugees, it added.

Death and devastation: Syria's seven-year war

Mr Rouhani said the battle in Syria would continue until rebels were pushed out of the whole country, especially in Idlib, but he added that any military operations should avoid hurting civilians.

The Iranian leader called on all rebels in Syria to disarm and seek a peaceful end to the conflict.

"The fight against terrorism in Idlib is an indispensable part of the mission to return peace and stability to Syria, but this fight should not harm civilians and lead to a 'scorched-earth' policy," Mr Rouhani said.

Mr Erdogan said Turkey no longer had the capacity to take in any more refugees from Syria should the government offensive in Idlib go ahead.

Turkey has accepted 3.5 million refugees from Syria since the start of the war in 2011.

"Whatever reason there is an attack that has been made or will be made will result in disaster, massacre and humanitarian drama," he said.

"Millions will be coming to Turkey's borders because they have nowhere to go. Turkey has filled its capacity to host refugees."

The Assad government was not directly represented at the summit, nor were the United States and other western powers.

The US came in for criticism from all sides, highlighting the complex nature of a conflict involving a myriad of factions.

Mr Rouhani said the US should end its presence in Syria, while Mr Erdogan said Turkey was "extremely annoyed" by Washington's support for the Syrian Kurdish YPG militia, whom Ankara considers as terrorists linked to Kurdish separatists in Turkey.

Widely abhorred internationally for the brutal conduct of the war, President Assad has largely reclaimed most of Syrian territory though much of it is ravaged.

Although the west has long said he must stand down or be removed, that looks unlikely at this point. Meanwhile, the fate of Idlib hangs in the balance.

Elsewhere, the UN peace envoy for Syria has proposed a plan for Al-Qaeda-linked fighters in Idlib to pull back from civilian areas to avert a bloodbath in the rebel-held province.

The United Nations has warned of a humanitarian disaster if Syrian forces, backed by Russia and Iran, launch an all-out attack in Idlib.

Addressing the UN Security Council, Staffan de Mistura also called for evacuation corridors to be opened for civilians to voluntarily leave the war zone, under UN monitoring.

Mr De Mistura proposed that a deadline be set for all fighters - in particular the Nusra Front - to move away from populated areas and that no military attacks would be launched during the pullback.

"This would apply in particular for Al-Nusra, who should be notified by the guarantors, in particular Turkey, which still has the capacity to send messages," he said.