Top military leadership met on Tuesday to discuss internal and regional security developments in a Corps Commanders Conference in Rawalpindi, chaired by Chief of Army Staff (COAS) General Qamar Javed Bajwa.
"He agreed with Secretary Mattis that both Pakistan and the US have common stakes in securing peace and security in Afghanistan for the long term stability of the broader region", the statement further said. "We want peace in Afghanistan".
A United States defence official, speaking on condition of anonymity, said Mattis's conversations had been "straightforward" and specific.
Citing the USA war in Afghanistan has taken a big toll on Pakistan, Asif said stability in the region is key to prosperity.
They made a decision to continue efforts for Afghan peace.
The following month, US President Donald Trump threatened further cuts to assistance to Pakistan over allegations that the government harboured Taliban and other militant groups operating in Afghanistan.
The office said in a statement that Mattis emphasized that in view of his long association with Pakistan, he was "keenly aware of the sacrifices rendered and the lives lost in Pakistan's fight against terrorism and extremism; and his personal respect and appreciation for the professional abilities of Pakistan's armed forces".
In a speech in August presenting his war strategy for Afghanistan, Trump accused Pakistan of hosting "agents of chaos" and said that its approach would have to change "immediately".
When asked if he would "prod" Islamabad to take more action, he replied: "That's not the way I deal with issues".
But Mattis's comments were in contrast to more strident language from the Central Intelligence Agency chief at a security forum last weekend. "We have eliminated safe havens from Pakistan's soil but are prepared to look into the possibility of miscreants exploiting Pakistan's hospitality to the Afghan Refugees to the detriment of our Afghan brothers", it said.
The support was reportedly offered during a meeting with Mattis during his visit to Islamabad.