Kabul, Sept. 1 -- The Taliban attacked a second Afghan city in as many days on Sunday and killed several members of security forces, officials said, even as Washington's peace envoy said the U.S. and the militant group are "at the threshold of an agreement" to end America's longest war.

The attack on the capital of Baghlan province came hours after U.S. envoy Zalmay Khalilzad said he warned the Taliban during talks in Qatar that "violence like this must stop." But he appeared determined to move forward on a deal that plans the withdrawal of some 14,000 remaining U.S. troops in exchange for Taliban guarantees that Afghanistan will not be used as a launch pad for global attacks.

Khalilzad was visiting Kabul on Sunday to brief the Afghan g...