US President Barack Obama has urged Pakistan to show it is "serious" about crushing extremist networks operating on its territory, saying the latest mass killing of students underlined the need for more decisive action.
In an interview with the Press Trust of India published on Sunday, Obama praised recent crackdowns by Pakistani security forces but said more should be done to eradicate violent Islamist groups.
"Pakistan has an opportunity to show that it is serious about delegitimising, disrupting and dismantling terrorist networks," Obama told the news agency in Washington.
"In the region and around the world, there must be zero tolerance for safe havens and terrorists must be brought to justice."
Twenty-one people were killed last Wednesday in an attack at a university campus in Pakistan's tribal northwest which was claimed by a faction of the Pakistani Taliban, barely a year after a massacre at a school in Peshawar that killed more than 150 people.
A military offensive against extremists in Pakistan's tribal areas was intensified after the Peshawar attack, although Indian officials say authorities across the border still turn a blind eye to jihadist groups.
Obama said the crackdown on extremists was "the right policy" but was quoted as saying that Pakistan "can and must" take more effective action.
"Since then (Peshawar), we have seen Pakistan take action against several specific groups," said Obama.
"We have also seen continued terrorism inside Pakistan such as the recent attack on the university in northwest Pakistan."
India has blamed gunmen belonging to the Pakistan-based militant group Jaish-e-Mohammed for an attack on one of its air force bases close to the Pakistan border earlier this month that left seven soldiers dead.
Obama said that attack in Punjab was "another example of the inexcusable terrorism that India has endured for too long".
The attack came only days after Indian Prime Minister Narendra Modi had paid his first visit to Pakistan, dropping in for talks with his counterpart Nawaz Sharif on his way home from Afghanistan.
Modi has resisted pressure to put ties with Pakistan back in deep freeze after the air base attack, and Obama endorsed the continuation of contacts.
"Both leaders are advancing a dialogue on how to confront violent extremism and terrorism across the region," Obama said.