The Afghan president announced a harder stance against the Taliban militants Monday, moving away from previous calls for peace talks, after last week's deadly attack in Kabul.
“Those who rejected our calls for peace will soon beg for it after they fail on the battlefield,” President Ashraf Ghani told the combined houses of parliament.
The door to peace remains open to some Taliban factions but for a limited time only, he said.
The shift in policy comes after a militant attack in the capital on April 19 killed more than 60 people and wounded more than 300.
Ghani also said he would move away from leaning on neighbouring Pakistan to bring the Taliban to the peace table, and ask Pakistan instead to step up operations against militants on its territory.
Pakistan's own security services have historic ties with some factions of the Afghan Taliban dating back to the Afghan-Soviet war of 1979-89.
The links have caused friction, with Kabul accusing Islamabad of turning a blind eye to Afghan Taliban based on the Pakistani side of the border.
But since last year the Afghan administration has been trying to make the most of Pakistan's connections, using them to coax the militants to join talks.
Ghani's Monday statement indicated a shift away from that strategy.
“There are no good or bad terrorists, there are only terrorists and Pakistan must understand that and act against them,” he said.
A four-country group has been backing Pakistan's efforts to bring the Taliban to the peace table.
But the Quadrilateral Coordination Group, which also includes Afghanistan, China and the United States, has made little progress since the Taliban refused to join talks in March.
It was the first time Ghani has directly called on Pakistan to act on militants within its borders.
“The leadership of the Taliban is in Quetta and Peshawar, in the hands of enemies of the country that spill the blood of their countrymen and take pleasure from destroying the people of Afghanistan," he said.
Ghani went on to warn that if Pakistan does not fulfill its obligations to act, he would take the matter up with the UN Security Council.
Afghan forces were stretched thin across the country last year fighting the Taliban insurgency as it gained control of the most territory the militants have held since they were ousted in 2001.
The national forces have held lead responsibility for security since NATO combat missions ended in December 2014.