NICOSIA, Cyprus — Secretary of State John Kerry said Thursday he believes that if an agreement can be reached to ease President Bashar al-Assad of Syria from power, a coalition of Americans, Russians and Syrian forces could wipe out the Islamic State “in a matter of literally months.”

Mr. Kerry’s comments, in a speech to the Organization for Security and Cooperation in Europe in Belgrade, Serbia, on Thursday morning, were the first in which he publicly offered an estimate of how quickly a well-organized effort might be able to defeat the radical Sunni group. He also said that “without the ability to find some ground forces that are prepared to take on Daesh,” using an Arabic acronym for the group, “this will not be won completely from the air, and we know that.” But he was not specific about where those ground troops would come from. His aides later said they would have to be indigenous.

For weeks Mr. Kerry, who arrived in Cyprus later in the day to help advance the first real chance the island has had in decades to unify Greek and Turkish Cypriots under one flag, has argued that his diplomatic effort in Syria had to be matched with military pressure.

Yet while American officials say they want to see Mr. Assad leave office, they clearly do not want to have that transition happen too quickly. An abrupt removal of Mr. Assad could create a vacuum in Damascus that the Islamic State would probably try to exploit. “Just imagine how quickly this scourge could be eliminated — in a matter of literally months — if we were able to secure that kind of political resolution,” Mr. Kerry said.