(This June 8 story was refiled to clarify that ceasefire takes effect on Tuesday)

KABUL (Reuters) - Afghan security forces killed 10 Taliban militants as a ceasefire was announced by the president, an official said on Friday.

The 10 included five Pakistanis killed in Thursday’s clash in the eastern province of Nangarhar, the official said. “We finished the operation and will now follow the ceasefire plan,” he said on Friday.

The ceasefire takes effect on Tuesday and lasts until June 20.

Four people were killed and five wounded by unidentified gunmen in a separate attack on a lawmaker’s Nangarhar home on Friday. The lawmaker was not at home at the time.

In western Herat province, gunmen opened fire during Friday prayers, killing two people, a spokesman for the provincial governor said. In eastern Laghman province, next to Kabul, a bomb blast killed a cleric and two others, an official said.

The ceasefire was welcomed by the United Nations, the United States and NATO, but some independent analysts expressed scepticism. One diplomat called it a “one-sided love story” as the Taliban, who have yet to respond, are deemed unlikely to reciprocate.

Some diplomats said it came as a surprise - at one level, the government wanted intensified air strikes, but on another it was offering an olive branch.

Security officials said they would suspend operations against the Taliban in line with the ceasefire, but would respond if attacked.

President Ashraf Ghani announced an unconditional ceasefire with the Taliban coinciding with Eid, the end of the Muslim fasting month, but excluding other militant groups, such as Islamic State.

“It is not a laying-down of arms,” a senior official told Reuters.

The ceasefire followed a meeting of Islamic clerics this week that declared a fatwa, or ruling, against suicide bombings, one of which, claimed by Islamic State, killed 14 people at the entrance to the clerics’ peace tent in Kabul.

The clerics also recommended a ceasefire with the Taliban, who are fighting to reimpose strict Islamic law after their ouster in 2001, and Ghani endorsed the recommendation.

The United States wants to step up military operations against Islamic State militants in Nangarhar during the ceasefire, the top U.S. general in Afghanistan said on Friday.

“(Operations against IS) will continue, in fact, will be even intensified, during this period of ceasefire, as we focus on ISIS,” General John Nicholson, commander of U.S. and international forces in Afghanistan, told reporters in Brussels.