Patients at a hospital on the outskirts of the Sayeda Zeinab district south of Damascus, Syria, April 25, 2016. (Omar Sanadiki/Reuters)

Secretary of State John Kerry imposed an August deadline for Syrian President Bashar al-Assad to transition out of power, warning the Damascus-based government and its Russian and Iranian backers that non-adherence to the ultimatum will prompt a new US approach to ending the five-year-old war.

"The target date for the transition is 1st of August," Kerry said in a press conference at the State Department on Tuesday. "So we're now coming up to May. So either something happens in these next few months, or they are asking for a very different track."

It's not clear how much weight Kerry's ultimatum has. The US has issued a number of threats against Assad since the civil war first erupted five years ago, including Kerry's warning that Assad's days were "numbered" in 2011, and President Barack Obamas declaration that chemical weapons were a "red line" that, if used by Assad's regime, would prompt decisive US action. Assad proceeded to use chemical weapons and the US walked back from its threat.

The Obama administration has long been opposed to putting US troops into Syria in large numbers. Currently there are 300 US advisors working with Syrian rebels.

Kerry spoke after attempting to restore a partial truce in Syria amid a dramatic rise in violence, especially in Aleppo. Kerry was in Geneva on Tuesday as UN Envoy Staffan de Mistura met with Russian Foreign Minister Sergey Lavrov in Moscow.

Kerry warned Assad of "repercussions" if he does not stick to a ceasefire brokered by Russia and the United States and move forward with a political transition aimed at ending Syria's war.

But Kerry said he still hoped diplomatic efforts could restore a nationwide February 27 ceasefire to include Aleppo, which has felt the brunt of increased fighting in recent weeks.

"If Assad does not adhere to this, there will clearly be repercussions, and one of them may be the total destruction of the ceasefire and then go back to war," Kerry said. "I don't think Russia wants that. I don't think Assad is going to benefit from that. There may be even other repercussions being discussed."

Again, it was unclear what Kerry meant by repercussions.

Kerry said that without a ceasefire in Aleppo, Syria's largest city before the civil war erupted in 2011, the violence there was in danger of spiraling out of control. The plan now being worked on to ensure a more lasting ceasefire would try to separate rival forces from militias, which are not covered by the ceasefire.

"The line they are trying to draw now would prohibit any kind of incursion of Aleppo, it will not allow Aleppo to fall," Kerry said. He added that the truce was holding in areas of Damascus and Latakia region where he said there had been a "meaningful" drop in violence.

Kerry said the United States was trying to determine which opposition group was responsible for a rocket attack on a hospital in Aleppo on Tuesday, saying there was no justification for such "horrific violence."

He repeated the United States would never accept a transition that included Assad.

"If Assad's strategy is to somehow think he's going to just carve out Aleppo and carve out a section of the country, I got news for you and for him — this war doesn't end," Kerry said.