The United States and Russia agreed here Friday to the renewal of a cease-fire in Syria, to begin Monday with the cessation of all air and ground attacks by all parties, including the government of Syrian President Bashar al-Assad.

If the truce holds for seven consecutive days and humanitarian aid begins to flow unimpeded to besieged areas, Secretary of State John F. Kerry said the United States and Russia will then establish a “Joint Implementation Center” to coordinate their intelligence and air attacks against agreed terrorist targets in Syria.

A “bedrock” of the agreement, Kerry said, is Russia’s ensuring that Assad’s air force will no longer fly combat missions over opposition and civilian areas. “This step is absolutely essential,” Kerry said. “By all accounts, Assad air attacks have been the main driver of civilian casualties and migration flows” out of Syria.

[How Russian special forces are shaping the fight in Syria]

The agreement is the culmination of months of up-and-down talks between Kerry and Russian Foreign Minister Sergei Lavrov, who met here Friday for a marathon negotiating session whose end was delayed by several hours of consultations between Kerry and senior national security officials in Washington.

Russian Foreign Minister Sergei Lavrov speaks to reporters during a break in his meeting with U.S. Secretary of State John Kerry in Geneva, Switzerland where they have been discussing the crisis in Syria September 9, 2016. (Kevin Lamarque/Reuters)

President Obama and Russian President Vladimir Putin discussed the proposed deal during talks last weekend in China.

And it was welcomed Friday in Geneva by Staffan de Mistura, the U.N. special envoy for Syria. “The United Nations hopes that the political will that led to this understanding is sustained,” he said. “It creates a real window of opportunity which all relevant actors in the region and beyond should seize to put the crisis in Syria on a different path and ease the violence and suffering being endured by the Syrian people.”

Both Kerry and Lavrov emphasized that outside supporters

of all non-terrorist belligerents would have to bring their allies in line. They provided no details on how they would deal with violations.

Documents outlining the specifics of the agreement were not released, and Lavrov said at a news conference that they would be withheld to prevent terrorist targets from anticipating attacks against them. Only the broad outlines were described at the news conference.

Final approval from Washington came after Kerry spent hours late Friday on a secure conference video with top national security officials in Washington, some of whom — particularly in the Pentagon — have disagreed with proposed coordination of counterterrorism airstrikes with Russia.

Lavrov took advantage of the delay to score some propaganda points with the media awaiting their joint news conference, distributing pizza and bottles of vodka to reporters.

In the news conference, the Russian minister underlined that agreement had been undermined by a “deep lack of confidence and trust between Russia and the American partners,” particularly, but not exclusively, in Syria.

1 of 41 Full Screen Autoplay Close Skip Ad × Scenes from Aleppo View Photos The Syrian government has dropped two chlorine bombs in the past month on the besieged, rebel-held city. Caption Images from inside the Syrian city. Dec. 19, 2016 Syrians evacuated from Fuaa and Kafraya, two Shiite villages under rebel siege, are welcomed by pro-government forces as they arrive in Jibrin, on the eastern outskirts of Aleppo. George Ourfalian/AFP/Getty Images Buy Photo Wait 1 second to continue.

“It is the primary responsibility of the leading powers, first of all Russia and the United States . . . to do everything to create the necessary conditions to settle this very difficult conflict,” he said, “despite all the problems that have arisen . . . [and] all the mistrust still with us.”

[Iran ends Russian use of air base because of unwanted publicity]

As Kerry negotiated with the Russians over the past several months, officials at the Pentagon and some at the White House did little to hide their skepticism about the proposed deal. Some argued that Moscow was trying the run out the clock until the end of the administration in hopes of a better deal from Obama’s ­successor. Others insisted that Russia was certain that its chances of agreement would worsen, particularly if Hillary Clinton was elected.

The intensive diplomacy that led to Friday’s meeting began in July, when Kerry discussed with Lavrov, and then carried personally to Putin, an Obama-approved proposal to share intelligence and coordinate air operations against agreed-upon terrorist groups, in particular the Front for the Conquest of Syria — or Jabhat Fatah al-Sham, the group formerly known as Jabhat al-Nusra, which recently announced it had broken with al-Qaeda. U.S. officials have said the claim of a split is not credible.

In technical discussions over the last several weeks, U.S. and Russian military and intelligence officials have mapped out “boxes” in Syria, designating areas with a preponderance of Front forces, those regions where the terrorists overlap with opposition groups, and areas that are primarily opposition and civilians. Russia has continued to call on the United States to separate the opposition forces it supports from militant groups.

Both Kerry and Lavrov dismissed suggestions that the military coordination to target the Front was a U.S. concession to Russia. “It is profoundly in the interest of the United States to target . . . al-Qaeda’s affiliate in Syria, which is Nusra, an organ that is opposed to peaceful transition . . . the enemy of legitimate opposition and currently plotting attacks beyond Syria’s borders, including against the United States.”

Kerry acknowledged the truth of the Russian charge that some opposition groups are fighting in tandem with the Front and said it was incumbent on them to now make a choice.

While the cease-fire is to cover all of Syria, both Kerry and Lavrov emphasized the initial importance of allowing humanitarian convoys to reach Aleppo, where hundreds of thousands are without food, water and electricity. “If Aleppo continues to be torn apart, the prospects for Syria” are doomed, Kerry said.

[Chlorine attack deepens fears among besieged Aleppo residents]

The track record for Syrian agreements is not good. After years of failed attempts to stem the fighting, Kerry organized a group of more than a dozen countries, including Russia and Iran, that last November pledged to stop their own attacks and those of their allies inside the country.

In December, the U.N. Security Council bolstered the pledge with a resolution; two months later, the group set a late February date for implementation. The truce had been in force little more than a month when fighting again erupted.