The Pakistani government has reacted to U.S. allegations that it support terrorist groups by saying the United States’ failure in the war in Afghanistan should not be blamed on Islamabad.

“Their failures over the past 16 years in Afghanistan [are] before them,” Foreign Minister Khawaja Asif said in an address to the Pakistani Senate.

“There will only be room for improvement if Washington accepts their defeat, their failures in Afghanistan,” Asif said, adding that the U.S. is “not ready to accept this.”

The diplomat also said the Pakistani government will not compromise on its sovereignty and dignity.

Pakistan’s relations with the U.S. should be based on self-respect and dignity, he said.

It came after accused Pakistan of providing safe haven for a number of terrorist organizations.

“Pakistan needs to, I think, take a clear-eyed view of the situation that they are confronted with in terms of the number of terrorist organizations that find safe haven inside of Pakistan,” U.S. Secretary of State Rex Tillerson said Monday.

Tillerson also said on Friday that it should roll up terrorist groups operating in the country and end the establishment support for such groups.

Otherwise, he said, Washington will find ways to achieve its objectives.