U.S. Secretary of State John F. Kerry speaks at the World Economic Forum in Davos, Switzerland, on Jan. 24. (Michel Euler/AP)

Israel cannot make peace with the Palestinians so long as it fears that a free Palestine next door would be a base for terrorism or attacks on Israel, Secretary of State John F. Kerry said Friday, explaining why Israeli security concerns figure so prominently in his effort to forge a peace deal.

“The Palestinians need to know that at the end of the day, their territory is going to be free of Israeli troops; that occupation ends,” Kerry told the World Economic Forum gathering here.

“But the Israelis, rightfully, will not withdraw unless they know that the West Bank will not become a new Gaza,” he said, referring to the regular rocket attacks on Israel from the Gaza Strip since Israel withdrew forces in 2005. “Nobody can blame any leader of Israel for being concerned about that reality,” Kerry said.

Palestinians complain that the talks Kerry inaugurated last summer have made little headway because of Israel’s insistence that its security needs be addressed first. Kerry has struggled to both accommodate those concerns and keep Palestinians at the table.

Kerry set an April deadline for a deal, but the timeline is widely expected to slip. The main focus now is on what the United States calls a framework for final negotiations.

“The truth is that after decades of struggling with this conflict, we all know what the endgame looks like,” Kerry said. It includes a phased but complete withdrawal of Israeli forces from the West Bank, where the Palestinian state would be established, Kerry said.

He added that the goal is also “mutual recognition of the nation-state of the Palestinian people and the nation-state of the Jewish people.”

Israeli Prime Minister Benjamin Netanyahu has been insisting that peace terms include new recognition of Israel as a Jewish state, something that will be difficult for Palestinians to accept.

Kerry met with Netanyahu in Davos on Friday. Israel’s top peace negotiator is also attending the Swiss forum, along with Obama’s peace advisers.

Kerry also challenged Iran to make good on Iranian President Hassan Rouhani’s more open stance to the world. Rouhani, who addressed the Davos forum Thursday, denied that his country has any intention to build a nuclear weapon.

“While the message is welcome, the words themselves are meaningless unless actions are taken to give them meaning,” Kerry said. “If you are serious about a peaceful program, it’s not that hard to prove that your program is peaceful.”

Kerry’s address about the Middle East included no mention of Egypt, where the military-backed interim government has largely ignored U.S. advice about a quick move to elections.

Kerry pushed back against the accusation, voiced prominently at Davos by Sen. John McCain (R-Ariz.) and Saudi Prince Turki al-Faisal, that the United States is retreating from its responsibilities in the Middle East.

“This misperception appears to be based on the simplistic assumption,” Kerry said, “that the only tool of our influence is our military, and that if we don’t have a huge troop presence or aren’t brandishing an immediate threat of force, we are somehow absent from the arena.”