Pakistan has warned the United States against undertaking any "unilateral" military action on its soil and rejected as baseless accusations of "inaction" against the Haqqani Network plotting deadly attacks in neighboring Afghanistan.

Chief military spokesman Major-General Asif Ghafoor reiterated Thursday that Pakistani forces have undertaken "indiscriminate operations" against terrorists, including Haqqanis," rendering U.S. charges of "inaction" as irrelevant and baseless.

He went on to say the impact of Pakistan's counterterrorism actions "will be seen in subsequent years and months."

"Unfortunately, in this context, we are getting signals of a unilateral action from America," Gafoor said while addressing a news conference at the army headquarters in Rawalpindi.

U.S. officials have long accused Islamabad of turning a blind eye or covertly helping the Afghan Taliban and Haqqanis to stage cross-border attacks against Afghan and U.S.-led forces.

The Pentagon recently told Congress it will work to expand cooperation with Pakistan "in areas where our interests converge and to take unilateral steps in areas of divergence."

The Durand line, on the Afghanistan-Pakistan border

Earlier this month, CIA Director Mike Pompeo warned Islamabad that if it does not eliminate the alleged safe havens inside its territory, the U.S. will do "everything we can" to destroy them.

General Ghafoor questioned and criticized the U.S. threats, saying they ignore a "huge price both in blood and treasure" Pakistan has paid in fighting terrorism in support of coalition efforts in Afghanistan.

"The armed forces of Pakistan are working with friends and want to continue doing so," he said. "But there can be no compromise on our sovereignty. We do not want a conflict with our friends but would ensure security of Pakistan."

He noted Islamabad has been cooperating and contributing to peace inside Afghanistan. He said Pakistan will continue to do so.

"No amount of coercion can work. It is only the engagement and trust based cooperation which can take us forward towards enduring peace in the region," said Ghafoor. "If there are any facilitators and abetters inside Pakistan that can only be addressed if the 2.7 million Afghan refugees are sent back to Afghanistan."

Ghafoor added that Pakistan is securing its long porous frontier with Afghanistan by building a fence, security posts and forts to control cross-border movement. The fencing project will be completed by December of 2018, he added.

"We have done enough and we cannot do anymore for anyone," he said. "… Actually, this is [the] turn and time for Afghanistan and the United States to do more rather than asking Pakistan."

U.S. officials have not elaborated on what kind of military action they intend to take. In 2011, U.S. special forces conducted a unilateral operation in the Pakistani city of Abbottabad and killed al-Qaida chief Osama bin Laden.

CIA-run drones have also been targeting suspected militant hideouts in border regions of Pakistan and some anticipate expansion of such strikes deep inside the country.