WASHINGTON: The United States (U.S.) on Thursday said that Pakistan has gone after militant groups 'selectively' and urged Islamabad to eliminate all groups, even those that might not threaten Pakistan itself but threaten its neighbors.

"Pakistan has taken and is taking steps to counter terrorist violence, and certainly focusing on those groups that threaten its stability. They’ve restored government control to parts of Pakistan that were used as terrorist safe havens for years," said U.S. State Department spokesman Mark Toner during the daily media briefing.

He said that these steps have contributed to security interests in the region and they’ve come at a cost of Pakistani lives lost.

"But at the same time, they must target all militant groups including those that target Pakistan’s neighbors, and they must also close all safe havens," said the spokesman.

"They’re going after groups, but selectively," he continued further, adding that we need to see them go after even those groups that might not threaten Pakistan itself but threaten its neighbors.

Speaking with regard to proposed joint efforts against terrorism in the region, the spokesman said that the U.S. encourages a regional dialogue between Pakistan and India regarding counterterrorism efforts.

"We advocate for closer cooperation between India and Pakistan to deal with terrorist threats in both their countries," Toner said.

Terrorism is obviously a reality in both countries, and in order to effectively confront it, they need to work together, he added.

Asked about a quadrilateral counterterrorism alliance formed by China in association with Afghanistan, Pakistan, and Tajikistan, he said: "We don’t view it as counterproductive that China pursues closer ties – certainly in the security and counterterrorism fields – with Central Asian countries."

Acknowledging that there are a lot of problems to be addressed, the spokesperson said that we certainly don’t view any effort to more closely coordinate among those countries – all of whom are affected by terrorism in the region.

"We, in fact, view it as a positive," he added.